/** * 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. * * @param logger logger to be used to log the message. * @param loggingLevel message level. * @param type type of the message. * @param t throwable that has been thrown. * @param messageParts message parts that will be stringified and concatenated to create a log message. */ public void appendTraceMessageWithThrowable(Logger logger, Level loggingLevel, Type type, Throwable t, Object... messageParts) { if (this.tracingLevel.intValue() <= loggingLevel.intValue()) { String message = stringifyMessageParts(messageParts); appendTracingHeader(message); } appendLogMessageWithThrowable(logger, loggingLevel, type, t, messageParts); }
/** * 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. * * @param logger logger to be used to log the message. * @param loggingLevel message level. * @param type type of the message. * @param t throwable that has been thrown. * @param messageParts message parts that will be stringified and concatenated to create a log message. */ public void appendTraceMessageWithThrowable(Logger logger, Level loggingLevel, Type type, Throwable t, Object... messageParts) { if (this.tracingLevel.intValue() <= loggingLevel.intValue()) { String message = stringifyMessageParts(messageParts); appendTracingHeader(message); } appendLogMessageWithThrowable(logger, loggingLevel, type, t, 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. * * @param logger logger to be used to log the message. * @param loggingLevel message level. * @param type type of the message. * @param t throwable that has been thrown. * @param messageParts message parts that will be stringified and concatenated to create a log message. */ public void appendLogMessageWithThrowable(Logger logger, Level loggingLevel, Type type, Throwable t, Object... messageParts) { if (logger.isLoggable(loggingLevel)) { String message = stringifyMessageParts(messageParts); if (sessionId == null) { logRecords.add(new LogRecord(logger, loggingLevel, type, message, t, false)); } else { if (t != null) { logger.log(loggingLevel, formatLogMessage(message, type, System.nanoTime()), t); } else { logger.log(loggingLevel, formatLogMessage(message, type, System.nanoTime())); } } } }
/** * 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. * * @param logger logger to be used to log the message. * @param loggingLevel message level. * @param type type of the message. * @param t throwable that has been thrown. * @param messageParts message parts that will be stringified and concatenated to create a log message. */ public void appendLogMessageWithThrowable(Logger logger, Level loggingLevel, Type type, Throwable t, Object... messageParts) { if (logger.isLoggable(loggingLevel)) { String message = stringifyMessageParts(messageParts); if (sessionId == null) { logRecords.add(new LogRecord(logger, loggingLevel, type, message, t, false)); } else { if (t != null) { logger.log(loggingLevel, formatLogMessage(message, type, System.nanoTime()), t); } else { logger.log(loggingLevel, formatLogMessage(message, type, System.nanoTime())); } } } }