Skip to content

$.trace

$.trace represents the trace namespace with its methods.

Overview

Sample Usage

let trace = $.trace;

// Check trace methods availability in the "Preview" tab
$.response.setBody("Debug logging enabled: " + trace.isDebugEnabled()
    + ", Error logging enabled: " + trace.isErrorEnabled()
    + ", Fatal logging enabled: " + trace.isFatalEnabled()
    + ", Info logging enabled: " + trace.isInfoEnabled()
    + ", Warning logging enabled: " +trace.isWarningEnabled());

// If the trace method is enabled, it will print the message in the "Console" tab
trace.debug("Debug message!");
trace.error("Error message!");
trace.error("Fatal message!");
trace.info("Info message!");
trace.warning("Warning message!");

Constants

Name Description Type Default
XSK_LOG_DEBUG_ENABLED Enables debug level logging. boolean true
XSK_LOG_ERROR_ENABLED Enables error level logging. boolean true
XSK_LOG_FATAL_ENABLED Enables fatal level logging. boolean true
XSK_LOG_INFO_ENABLED Enables log level logging. boolean true
XSK_LOG_WARNING_ENABLED Enables warning level logging. boolean true

Functions

Function Description Returns
debug(message) Writes the given message with the trace-level debug to the application trace file. -
error(message) Writes the given message with the trace-level error to the application trace file. -
fatal(message) Writes the given message with the trace-level fatal to the application trace file. -
info(message) Writes the given message with the trace-level info to the application trace file. -
warning(message) Writes the given message with the trace-level warning to the application trace file. -
isDebugEnabled() Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level debug. boolean
isErrorEnabled() Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level error. boolean
isFatalEnabled() Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level fatal. boolean
isInfoEnabled() Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level info. boolean
isWarningEnabled() Returns true or false to show whether or not the tracer writes an entry in the application trace file for the trace-level warning. boolean