Loading TOC...

MarkLogic Server 11.0 Product Documentation
fn:trace

fn:trace(
   $value as item()*,
   $label as xs:string
) as item()*

Summary

Return the input $value unchanged and, if $label is the name of an enabled server event, log event to the App Server log file <install_dir>/Logs/<port>_ErrorLog.txt; where <install_dir> is the MarkLogic install directory, and <port> is the port number of the current App Server or "TaskServer" if the current request is running on the Task Server.

Parameters
value The values to trace.
label A string label for the trace output.

Usage Notes

In order for the trace event to print out in the log, you must enable the trace event in the Diagnostics page (Groups > group_name > Diagnostics ) of the Admin interface for the specified label.

Example

fn:trace("This is a trace event.", "MY TRACE EVENT")

=> If MY TRACE EVENT is defined as an enabled trace event
   in the Diagnostics page of the Admin interface, then a
   message similar to the following is added to the log:

   2015-03-20 17:56:09.346 Info: [Event:id=MY TRACE EVENT] 
                                 This is a trace event.

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