java.util.logging.Logger wrapper that gives logging records a common formatting and temporarily stores log
records and postpones their logging until they can be provided with a session ID. After a session ID has been
provided, messages are logged immediately.
Log records are provided with a session ID, so that log records from a single upgrade request can be easily linked together in a log of a busy server or client.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static enum | DebugContext.
Tracing threshold - used for configuration granularity of information that will be sent in tracing headers. |
| public static enum | DebugContext.
Type of tracing - used for tracing configuration. |
| public static enum | DebugContext.
Type of the record - used to graphically distinguish these message types in the log. |
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private String | |
| private final long | |
| private Map | |
| private final Level |
| Access | Constructor and Description |
|---|---|
| public | DebugContext(DebugContext.
tracing threshold. tracingThresholdConstructor that configures tracing to be ON and accepts tracing threshold as a parameter. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | appendLogMessage(Logger
logger to be used to log the message. logger, Level message level. loggingLevel, DebugContext.type of the message. type,message parts that will be concatenated to create a log message. messageParts)Append a message to the log, the logging will be postponed until the message can be provided with a session ID. Randomly generated session ID is used if a session has not been created. |
| public void | appendLogMessageWithThrowable(Logger
logger to be used to log the message. logger, Level message level. loggingLevel, DebugContext.type of the message. type,throwable that has been thrown. t, Object... message parts that will be stringified and concatenated to create a log message. messageParts)Append a message to the log, the logging will be postponed until the message can be provided with a session ID. Randomly generated session ID is used if a session has not been created. |
| public void | appendStandardOutputMessage(DebugContext.
type of the message. type,message to be logged. message)Write a message to the standard output, the logging will be postponed until the message can be provided with a session ID. Randomly generated session ID is used if a session has not been created. |
| public void | appendTraceMessage(Logger
logger to be used to log the message. logger, Level message level. loggingLevel, DebugContext.type of the message. type,message parts that will be stringified and concatenated to create a log message. messageParts)Append a message to the log and to the list of trace messages that are sent in handshake response. |
| public void | appendTraceMessageWithThrowable(Logger
logger to be used to log the message. logger, Level message level. loggingLevel, DebugContext.type of the message. type,throwable that has been thrown. t, Object... message parts that will be stringified and concatenated to create a log message. messageParts)Append a message to the log and to the list of trace messages that are sent in handshake response. |
| private void | |
| public void | |
| private String | |
| public Map | |
| public void | setSessionId(String
session ID. sessionId)Set a session ID that will be used as a common identifier for logged messages related to the same upgrade request. |
| private String |
| logRecords | back to summary |
|---|---|
| private List<DebugContext. | |
| sessionId | back to summary |
|---|---|
| private String sessionId | |
| startTimestamp | back to summary |
|---|---|
| private final long startTimestamp | |
| tracingHeaders | back to summary |
|---|---|
| private Map<String, List<String>> tracingHeaders | |
| tracingLevel | back to summary |
|---|---|
| private final Level tracingLevel | |
| DebugContext | back to summary |
|---|---|
| public DebugContext(DebugContext. Constructor that configures tracing to be ON and accepts tracing threshold as a parameter.
| |
| DebugContext | back to summary |
|---|---|
| public DebugContext() Constructor that configures tracing to be OFF. | |
| appendLogMessage | back to summary |
|---|---|
| public void appendLogMessage(Logger logger, Level loggingLevel, DebugContext. Append a message to the log, the logging will be postponed until the message can be provided with a session ID. Randomly generated session ID is used if a session has not been created.
| |
| appendLogMessageWithThrowable | back to summary |
|---|---|
| public void appendLogMessageWithThrowable(Logger logger, Level loggingLevel, DebugContext. Append a message to the log, the logging will be postponed until the message can be provided with a session ID. Randomly generated session ID is used if a session has not been created. | |
| appendStandardOutputMessage | back to summary |
|---|---|
| public void appendStandardOutputMessage(DebugContext. Write a message to the standard output, the logging will be postponed until the message can be provided with a session ID. Randomly generated session ID is used if a session has not been created.
| |
| appendTraceMessage | back to summary |
|---|---|
| public void appendTraceMessage(Logger logger, Level loggingLevel, DebugContext. Append a message to the log and to the list of trace messages that are sent in handshake response. The logging will be postponed until the message can be provided with a session ID. Randomly generated session ID is used if a session has not been created.
| |
| appendTraceMessageWithThrowable | back to summary |
|---|---|
| public void appendTraceMessageWithThrowable(Logger logger, Level loggingLevel, DebugContext. Append a message to the log and to the list of trace messages that are sent in handshake response. The logging will be postponed until the message can be provided with a session ID. Randomly generated session ID is used if a session has not been created. | |
| appendTracingHeader | back to summary |
|---|---|
| private void appendTracingHeader(String message) | |
| flush | back to summary |
|---|---|
| public void flush() Write pending messages to the log. | |
| formatLogMessage | back to summary |
|---|---|
| private String formatLogMessage(String message, DebugContext. | |
| getTracingHeaders | back to summary |
|---|---|
| public Map Get headers containing tracing messages. | |
| setSessionId | back to summary |
|---|---|
| public void setSessionId(String sessionId) Set a session ID that will be used as a common identifier for logged messages related to the same upgrade request. Setting the session ID will cause the pending messages to be written into the log.
| |
| stringifyMessageParts | back to summary |
|---|---|
| private String stringifyMessageParts(Object... messageParts) | |
| Modifier and Type | Field and Description |
|---|---|
| private Logger | logger
Logger that will be used to log the message. |
| private Level | loggingLevel
Logger level that will be used when logging the message. |
| private String | message
Message to be logged. |
| private boolean | printToSout
|
| private Throwable | t
Throwable to be logged. |
| private long | timestamp
Time when a the logged even has occurred. |
| private DebugContext. | type
Type of the record - used for graphical purposes when logging. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| logger | back to summary |
|---|---|
| private Logger logger Logger that will be used to log the message. | |
| loggingLevel | back to summary |
|---|---|
| private Level loggingLevel Logger level that will be used when logging the message. | |
| message | back to summary |
|---|---|
| private String message Message to be logged. | |
| printToSout | back to summary |
|---|---|
| private boolean printToSout
| |
| t | back to summary |
|---|---|
| private Throwable t Throwable to be logged. | |
| timestamp | back to summary |
|---|---|
| private long timestamp Time when a the logged even has occurred. | |
| type | back to summary |
|---|---|
| private DebugContext. Type of the record - used for graphical purposes when logging. | |
| LogRecord | back to summary |
|---|---|
| pack-priv LogRecord(Logger logger, Level loggingLevel, DebugContext. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final DebugContext. | SUMMARY
A less verbose tracing, an equivalent to |
| public static final DebugContext. | TRACE
A more verbose tracing, an equivalent to |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DebugContext. | |
| public static DebugContext. |
| SUMMARY | back to summary |
|---|---|
| public static final DebugContext. A less verbose tracing, an equivalent to | |
| TRACE | back to summary |
|---|---|
| public static final DebugContext. A more verbose tracing, an equivalent to The default tracing threshold. | |
| TracingThreshold | back to summary |
|---|---|
| private TracingThreshold() | |
| valueOf | back to summary |
|---|---|
| public static DebugContext. | |
| values | back to summary |
|---|---|
| public static DebugContext. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final DebugContext. | ALL
Tracing headers will be present in all handshake responses. |
| public static final DebugContext. | OFF
No tracing headers will be ever sent in handshake response. |
| public static final DebugContext. | ON_DEMAND
Tracing headers will be sent in handshake response only if X-Tyrus-Tracing-Accept header is present in handshake request. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DebugContext. | |
| public static DebugContext. |
| ALL | back to summary |
|---|---|
| public static final DebugContext. Tracing headers will be present in all handshake responses. | |
| OFF | back to summary |
|---|---|
| public static final DebugContext. No tracing headers will be ever sent in handshake response. | |
| ON_DEMAND | back to summary |
|---|---|
| public static final DebugContext. Tracing headers will be sent in handshake response only if X-Tyrus-Tracing-Accept header is present in handshake request. | |
| TracingType | back to summary |
|---|---|
| private TracingType() | |
| valueOf | back to summary |
|---|---|
| public static DebugContext. | |
| values | back to summary |
|---|---|
| public static DebugContext. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final DebugContext. | |
| public static final DebugContext. | |
| public static final DebugContext. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DebugContext. | |
| public static DebugContext. |
| MESSAGE_IN | back to summary |
|---|---|
| public static final DebugContext. | |
| MESSAGE_OUT | back to summary |
|---|---|
| public static final DebugContext. | |
| OTHER | back to summary |
|---|---|
| public static final DebugContext. | |
| Type | back to summary |
|---|---|
| private Type() | |
| valueOf | back to summary |
|---|---|
| public static DebugContext. | |
| values | back to summary |
|---|---|
| public static DebugContext. | |