Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Marklogic xdmp:log() in Query Console

Is it possible to view the output of xdmp:log() that was run directly from the query console, i.e. localhost:8000.

So if I had code like this:

let $c := "hello world"
return xdmp:log($c)

Where would I view the output for this log? I tried to check the log files in the Marklogic directory and it is not there. I also tried checking the console when I do "inspect element" and it is not there either. Is there another way, i.e. different function, I could use to view log outputs for the purposes of debugging code in MarkLogic?

like image 750
Andy Chan Avatar asked Nov 30 '25 02:11

Andy Chan


1 Answers

MarkLogic's error logs are grouped by the app servers' port assignments, so if Query Console is listening on port 8000, the error log you're looking for is 8000_ErrorLog.txt. You should be able to find that in MarkLogic/Logs directory or browsing the Logs tab of the Admin Console on port 8001, e.g., http://localhost:8001/get-error-log.xqy?filename=8000_ErrorLog.txt.

like image 124
s3-4v Avatar answered Dec 03 '25 04:12

s3-4v