2
votes

MarkLogic 9.0.8.2

At present we are using following way to Log/view debug/information/warning/errors in MarkLogic log files

  • XDMP:Log in Xquery with log level including within try-catch block
  • Application level logs

What are the best practices we should follow for logging and maintaining the same code in dev/ST/UAT/Prod environment.

1

1 Answers

5
votes

xdmp:log statements can be useful, but can also end up cluttering the logs making troubleshooting more difficult. Instead of just putting in xdmp:log statements in your code you might want to use xdmp:trace with specific traces which you can enable or disable at will.

This should allow the same code to be deployed to different environments, and support debugging and troubleshooting when needed, without overwhelming the logs.