Is there a way to quickly clear the server error log in MarkLogic?

Viewed 193

I very often use the Errorlog for debugging when i am working on a XQuery in MarkLogic.

The issue is that over a day the log can become quite full and it is annoying to always scroll to the bottom of the log.

Is there maybe a way to quickly clear the errorlog? Since it is for development only it does not matter how to achieve the solution.

I already tried clearing the local file in which the log is stored, but windows 10 won't let me change the content of the file until I stopped the MarkLogic Process.

1 Answers

Yeah, you have to stop MarkLogic, clear the log(s), and start MarkLogic up again. You can scripts it, it runs fairly fast.

The script could look something like this:

@echo off

net stop MarkLogic

for %%a in ("C:\Program Files\MarkLogic\Data\Logs\*") do break>%%~fa

net start MarkLogic

Note that this script clears all Files/Logs in the specified directory.

Related