Class Tracer

java.lang.Object
com.priint.pubserver.tracing.Tracer

public class Tracer extends Object
Tracer for writing trace messages into a persistent data store.
  • Constructor Details

    • Tracer

      public Tracer(Class<?> clazz)
      Create a Tracer object.
      Parameters:
      clazz - Class that calls the Tracer
    • Tracer

      public Tracer(Class<?> clazz, String source)
      Create a Tracer object.
      Parameters:
      clazz - Class that calls the Tracer
      source - Source of Tracer (like plug-in name and / or method name)
  • Method Details

    • info

      public void info(String source, String hint, String message, Object... argArray)
      Write an INFO trace message for a session. Analogous to a call to logger.info().

      For information on the arguments see TracerMessage.

      Parameters:
      source -
      hint -
      message -
      argArray -
    • error

      public void error(String source, String hint, String message, Object... argArray)
      Write an ERROR trace message for a session. Analogous to a call to logger.error().

      For information on the arguments see TracerMessage.

      Parameters:
      source -
      hint -
      message -
      argArray -
    • warning

      public void warning(String source, String hint, String message, Object... argArray)
      Write an WARNING trace message for a session. Analogous to a call to logger.warn().

      For information on the arguments see TracerMessage.

      Parameters:
      source -
      hint -
      message -
      argArray -
    • isTraceModeActive

      public boolean isTraceModeActive()
      Returns true if trace mode is active for the current session.
      Returns:
      true is tracing is on
    • isTraceModeActive

      public boolean isTraceModeActive(String sessionId)
      Is trace mode for session active
      Parameters:
      sessionId -
      Returns:
      true if tracing is active
    • apiCall

      public void apiCall(String source, String hint, String message, Object... values)
      Write an APICALL trace message to trace method calling (e.g. rest calls).
      Parameters:
      source - code source generating this event
      hint - optional text describing measures to be taken, when this event occurs
      message - executed command
      values - array of parameter values as array of Object (optional)
    • methodCall

      public void methodCall(String source, String hint, Class<?> methodClass, String methodName, Object... values)
      Write an INFO trace message to trace method calling.
      Parameters:
      source - code source generating this event
      hint - optional text describing measures to be taken, when this event occurs
      methodClass - Class containing a method to execute
      methodName - name of the method (without bracket and parameters)
      values - array of parameter values as array of Object
    • methodResult

      public void methodResult(String source, String hint, Object result, Class<?> methodClass, String methodName)
      Write an INFO trace message with method result.
      Parameters:
      source - code source generating this event
      hint - optional text describing measures to be taken, when this event occurs
      result - result of the method to trace
      methodClass - Class containing a method to execute
      methodName - name of the method (without bracket and parameters)