Loading TOC...


   $msg as item()*,
   [$level as xs:string?]
) as empty-sequence()


Logs a message into a specific app server error log file. System and Application logs are split and logged separately. If the function is executed on an app server at port 8888, the message will appear in <install_dir>/Logs/8888_ErrorLog.txt and not in <install_dir>/Logs/ErrorLog.txt. The <install_dir> is the location of the MarkLogic install directory. The port number is the port number of the current App Server or "TaskServer" if the current request is running on the Task Server. The log message is sent as soon as this function is called, even if the program from which it is called has not completed.

$msg Message for logging.
$level One of: emergency, alert, critical, error, warning, notice, info, config, debug, fine, finer, or finest. The default level is "info".


=> () and logs an info-level message with the text "AAAA"

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.


The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • xdmp:log(xdmp:describe($node,(),()) is useful for logging large nodes
    • Thanks for sharing this tidbit. I've been needing a solution to easily see large nodes much better, and I had never heard of the `xdmp:describe` function before. Helped a ton!
  • Mike Blakeley reminds us that MarkLogic can send log events to the underlying operating system via rsyslog http://blakeley.com/blogofile/2012/05/17/rsyslog-and-marklogic/