Raj
Raj

Reputation: 177

How can I override the default location of error.log file in marklogic 8 without new installation

Marklogic 8 is install in my local system C-drive and errorlog.txt is generated inside C:/program file/marklogic/data/log. Is there any way to override that path through admin api. I don't need fresh installation of marklogic for override path. Please provide me any suggestion?

Upvotes: 0

Views: 337

Answers (2)

DALDEI
DALDEI

Reputation: 3732

Windows is already configured to accept system logs, no action is needed. MarkLogic writes to the system logs AND to local logfiles depending on the group configuation for system logs and log files. as mentioned by David.

Logfiles are stored in the marklogic 'Data Directory' / Logs . This can be overridden by the environment variable MARKLOGIC_DATA_DIR but you would have to arrange for the Windows service startup to place that change in the service environment (beyond the scope of a simple answer).

Alternatively, standard windows file and directory junction, NTFS mounts and symbolic links can be used to physically relocate any directory. This may not survive updates and re-installs and is as complex and time consuming as re-installing, but it is a possible alternative.

Upvotes: 0

There is no documented way to do what you are asking. However, separate from the log files themselves, you could use system log facilities of your OS and then handle where/how log messages are logged via other system tools. See https://docs.marklogic.com/guide/admin/logfiles#id_76790

This includes how to set the information sent to your OS system logging facility. Further down in the same document also talks about how to read the system messages - including a note re windows and Linux.

If you dedicate your main logging to the OS system logging facility and want to minimise the size of the errorlog.text file, then setting the level to Emergency and rotating daily with only one copy kept will make it as small as possible. Then the real info can be found with the rest of your system logs.

Upvotes: 1

Related Questions