java.lang.Object
ortus.boxlang.runtime.components.Component
ortus.boxlang.runtime.components.system.Trace

@BoxComponent public class Trace extends Component
  • Constructor Details

    • Trace

      public Trace()
      -------------------------------------------------------------------------- Constructor(s) --------------------------------------------------------------------------
  • Method Details

    • _invoke

      public Component.BodyResult _invoke(IBoxContext context, IStruct attributes, Component.ComponentBody body, IStruct executionState)
      Traces messages into the tracing facilites so they can be display by the running runtime either in console, or debug output or whatever the runtime is configured to do.

      It will track from where the trace call was made and the message will be logged with the category, type and text provided.

      All tracers will be sent to the trace.log file in the logs directory of the runtime as well.

      If the abort attribute is set to true, the current request will be aborted after the trace call.

      Tracers will only be displayed if the runtime is in debug mode.. However, all traces will be logged regardless of the debug mode flag.

      The extraInfo attribute is optional and can be any simple or complex object. We will convert it to string for logging using the toString() method on the object. You can also use the alias of var for this attribute as well.

      Specified by:
      _invoke in class Component
      Parameters:
      context - The context in which the Component is being invoked
      attributes - The attributes to the Component
      body - The body of the Component
      executionState - The execution state of the Component
      Returns:
      The result of the invocation