Loading TOC...


   $name as xs:string
) as xs:boolean


Returns whether or not a trace event is enabled.

$name The trace event name.


xquery version "1.0-ml";
let $query := cts:word-query("hello")
  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.


The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • How can I enable a specific trace event from the config file? Thanks
    • I'm not sure what you mean by "from the config file." Could you clarify, please?
      • I want the trace events to be added at bootstrap time, not through the admin api, and I don't know how to specify the trace events in ml-config.xml
        • Ah, this is a Roxy question. I don't think Roxy currently supports enabling specific trace events, just turning on the trace feature. You could file that as an issue on Roxy's GitHub page: https://github.com/marklogic-community/roxy