Community

MarkLogic 10 and Data Hub 5.0

Latest MarkLogic releases provide a smarter, simpler, and more secure way to integrate data.

Read Blog →

Company

Stay On Top Of Everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up →

 
Knowledgebase: Administration
How to use diagnostic trace events
12 June 2012 01:25 PM

Summary

Diagnostic trace events can be particularly useful in situations where you need access to more internal diagnostic information than is available in the standard MarkLogic ErrorLog or in the Operating System logs.

The host / cluster can be configured to output trace events and from the point at which these diagnostics are enabled and added, the server will write information to the ErrorLog every time the diagnostic event is encountered.

Enabling Server trace events

Trace events need to be enabled and added by an administrator using the following steps:

  1. Log into the Admin Interface.
  2. Select Groups > group_name > Diagnostics
  3. The Diagnostics Configuration page appears
  4. Click the true button for trace events activated
  5. Enter the trace event Query Trace to enable the diagnostic event
  6. Click the OK button to activate the event(s)
  7. Open a session in qconsole and execute (something like) the following query:
  8. (xdmp:query-trace(true()), cts:search(doc(), cts:word-query("test")))
  9. Observe the ErrorLog for specific query trace information

Manual trace events

In place of using xdmp:log() you can also create custom trace events. The following steps outline this:

  1. Log into the Admin Interface.
  2. Select Groups > group_name > Diagnostics
  3. The Diagnostics Configuration page appears
  4. Click the true button for trace events activated
  5. Enter the trace event Hello World to enable the diagnostic event
  6. Open a session in qconsole and execute the following query:
  7. fn:trace("Here is a 'Hello World' trace event.", "Hello World")
  8. Observe the ErrorLog for specific query trace information

Trace event groups

Adding any of these to your diagnostics will cause the server to output a number of trace events relating to that particular group

  • httpserver
  • xdbcserver
  • forest
  • xqueryeval
  • xdqpserver
  • stand
  • list
  • tree
  • forestlabel
  • relevance
  • lock
  • cluster
  • config
  • module
  • cpf
  • classifier

Further reading

(0 vote(s))
Helpful
Not helpful

Comments (0)