Loading TOC...

MarkLogic 12 EA 1 Product Documentation
xdmp:request-log-put

xdmp:request-log-put(
   $key as xs:string,
   $value as item()
) as empty-sequence()

Summary

Stores or updates a (key, value) pair for the current request. The (key,value) pair is combined with other monitored meters and logged at the end of a request. When this function is called multiple times for the same key only the value from the last call is retained.

Parameters
$key A key. If the key is not unique, the existing value under the key will be replaced with the new value.
$value A value to log.

Example

let $request-stats :=
   map:map() => map:with("myFunction", "foo" )
             => map:with("parameters",  map:map() =>
                  map:with("arg1",100) )
             => map:with("executionTime", ...)
return xdmp:request-log-put("someKey1", $request-stats)

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