1
votes

I am exploring logging in MLv8 and discovered we can set certain log levels and rotation on log files through the ML's admin console. But coudn't find answers to some of the customization's which were required for us:

  • Can we rename or change location of the Error log file which is by default: Windows: C:\Program Files\MarkLogic\Data\Logs\ErrorLog.txt, Linux: /var/opt/MarkLogic/Logs/ErrorLog.txt
  • Can we customize the content of log file (like date format)
  • Is it possible to have multiple log files as per log level.
1

1 Answers

3
votes

There are no facilities to customize the default file logger that’s built into MarkLogic. However, in addition to the ErrorLog.txt you can also send log messages to the system logger (syslog on *NIX). From there, you can use all of the downstream logging tools designed for system logs. There’s a section in the docs that covers configuration of the system logger. (I even built a proof-of-conept that will save syslog messages as JSON to a MarkLogic database.)