Skip to main content
Version: 9.2605.x.x RR

Tracer

Class function

nevis.io.tracer.new(name)

Instantiates a new tracer object.

  • name: The name of your trace group.

Sample:

tracer = nevis.io.tracer.new("MyPrivateTracer")

Object methods

All methods accept an optional event string as their first argument. LUA events are reserved for this purpose; for possible event strings, see nevisProxy Events.

trace:debug([event,] text)

Prints a debug message in the navajo.log file.

Sample:

trace:debug("a text")
trace:debug("LU01", "a text")

trace:info([event,] text)

Prints an info message in the navajo.log file.

Sample:

trace:info("a text")
trace:info("LU01", "a text")

trace:notice([event,] text)

Prints a notice message in the navajo.log file.

Sample:

trace:notice("a text")
trace:notice("LU01", "a text")

trace:error([event,] text)

Prints an error message in the navajo.log file.

Sample:

trace:error("a text")
trace:error("LU01", "a text")

trace:data(data[, text])

Prints a max-level trace message in the navajo.log file, with the traced data in both readable and binary form.

  • data: The data to trace.
  • text: Optional header line for the traced data.

Sample:

trace:data("a text")
trace:data(chunk)
trace:data(chunk, "This is the header text")