Package com.priint.pubserver.tracing
Class SessionTracer
java.lang.Object
com.priint.pubserver.tracing.SessionTracer
Deprecated, for removal: This API element is subject to removal in a future version.
Tracer for writing session specific trace messages into a persistent data store.
Create a tracer only once in a class.
Tracer tracer = new Tracer("MyDataFunctions");
Use simple or extended signature of methods. You are strongly advised to use message as a template with "{}" for replacement.
Add replacements in open argument list, so that they only get evaluated, when trace is really written and not e.g. for
sessions that do not log.
tracer.info("my message {} {} {}", "eins", new Integer(2), Float.parse("3.0"));
tracer.warnExtended("mysource", "my message for something: {}", "my hint", someObject);
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionSessionTracer(String source) Deprecated, for removal: This API element is subject to removal in a future version.Create a tracer object. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.voiderrorAndLog(String message, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.voiderrorExtended(String source, String message, String hint, boolean log, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidinfoAndLog(String message, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.voidinfoExtended(String source, String message, String hint, boolean log, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.booleanisActive()Deprecated, for removal: This API element is subject to removal in a future version.voidlogAndTrace(TracerMessage.MessageType messageType, String source, String message, String hint, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidwarnAndLog(String message, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.voidwarnExtended(String source, String message, String hint, boolean log, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
SESSION_TRACE_ACTIVE_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Constructor Details
-
SessionTracer
Deprecated, for removal: This API element is subject to removal in a future version.Create a tracer object.- Parameters:
source- Source of tracer (like plugin name and / or method name)
-
-
Method Details
-
info
Deprecated, for removal: This API element is subject to removal in a future version.Write info to session trace.- Parameters:
message- text for trace and logargArray- arguments to be used for replacement in message string- See Also:
-
infoAndLog
@Deprecated(since="4.6.0", forRemoval=true) public void infoAndLog(String message, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.Write info to session trace and to server log.- Parameters:
message- text for trace and logargArray- arguments to be used for replacement in message string- See Also:
-
error
Deprecated, for removal: This API element is subject to removal in a future version.Write error to session trace.- Parameters:
message- text for trace and logargArray- arguments to be used for replacement in message string- See Also:
-
errorAndLog
@Deprecated(since="4.6.0", forRemoval=true) public void errorAndLog(String message, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.Write error to session trace and server log.- Parameters:
message- text for trace and logargArray- arguments to be used for replacement in message string- See Also:
-
warn
Deprecated, for removal: This API element is subject to removal in a future version.Write warning to session trace.- Parameters:
message- text for trace and logargArray- arguments to be used for replacement in message string- See Also:
-
warnAndLog
@Deprecated(since="4.6.0", forRemoval=true) public void warnAndLog(String message, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.Write warning to session trace and server log.- Parameters:
message- text for trace and logargArray- arguments to be used for replacement in message string- See Also:
-
infoExtended
@Deprecated(since="4.6.0", forRemoval=true) public void infoExtended(String source, String message, String hint, boolean log, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.Write an INFO trace message for a session. Analogous to a call to logger.info().For information on the arguments see
TracerMessage.- Parameters:
source- optional module or class and method namemessage- text for trace and loghint- optional information to user what to she can dolog- if true then SessionTracer will also write this message into the server log - at debug levelargArray- arguments to be used for replacement in message string
-
errorExtended
@Deprecated(since="4.6.0", forRemoval=true) public void errorExtended(String source, String message, String hint, boolean log, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.Write an ERROR trace message for a session. Analogous to a call to logger.error().For information on the arguments see
TracerMessage.- Parameters:
source- optional module or class and method namemessage- text for trace and loghint- optional information to user what to she can dolog- if true then SessionTracer will also write this message into the server log - at debug levelargArray- arguments to be used for replacement in message string
-
warnExtended
@Deprecated(since="4.6.0", forRemoval=true) public void warnExtended(String source, String message, String hint, boolean log, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.Write an WARNING trace message for a session. Analogous to a call to logger.warn().For information on the arguments see
TracerMessage.- Parameters:
source- optional module or class and method namemessage- text for trace and loghint- optional information to user what to she can dolog- if true then SessionTracer will also write this message into the server log - at debug levelargArray- arguments to be used for replacement in message string
-
isActive
Deprecated, for removal: This API element is subject to removal in a future version.Returns true if trace mode is active for the current session. -
logAndTrace
@Deprecated(since="4.6.0", forRemoval=true) public void logAndTrace(TracerMessage.MessageType messageType, String source, String message, String hint, Object... argArray) Deprecated, for removal: This API element is subject to removal in a future version.writes a message to the server log and additionally - if tracing is enabled - writes a trace too.log level is tracing level - 1, e.g. trace error = log warn, trace warning = log info, trace info = log debug
- Parameters:
messageType-source-message-hint-argArray-
-