MarkLogic 12 EA 1 Product Documentation
xdmp:trace-enabled

xdmp:trace-enabled(
   $name as xs:string
) as xs:boolean

Summary

Returns whether or not a trace event is enabled.

Parameters
name The trace event name.

Example

xquery version "1.0-ml";
let $query := cts:word-query("hello")
return
  if (xdmp:trace-enabled("Query Trace")) 
  then xdmp:log($query)
  else ()
Powered by MarkLogic Server | Terms of Use | Privacy Policy