Package com.priint.pubserver.tracing
Class Tracer
java.lang.Object
com.priint.pubserver.tracing.Tracer
Tracer for writing trace messages into a persistent data store.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidWrite an APICALL trace message to trace method calling (e.g.voidWrite an ERROR trace message for a session.voidWrite an INFO trace message for a session.booleanReturns true if trace mode is active for the current session.booleanisTraceModeActive(String sessionId) Is trace mode for session activevoidWrite an INFO trace message to trace method calling.voidWrite an INFO trace message with method result.voidWrite an WARNING trace message for a session.
-
Constructor Details
-
Tracer
Create a Tracer object.- Parameters:
clazz- Class that calls the Tracer
-
Tracer
Create a Tracer object.- Parameters:
clazz- Class that calls the Tracersource- Source of Tracer (like plug-in name and / or method name)
-
-
Method Details
-
info
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
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
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
Is trace mode for session active- Parameters:
sessionId-- Returns:
- true if tracing is active
-
apiCall
Write an APICALL trace message to trace method calling (e.g. rest calls).- Parameters:
source- code source generating this eventhint- optional text describing measures to be taken, when this event occursmessage- executed commandvalues- 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 eventhint- optional text describing measures to be taken, when this event occursmethodClass- Class containing a method to executemethodName- 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 eventhint- optional text describing measures to be taken, when this event occursresult- result of the method to tracemethodClass- Class containing a method to executemethodName- name of the method (without bracket and parameters)
-