Loading TOC...

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 ()

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