public abstract class AbstractBotLogger extends Object implements BotLogger
| Constructor and Description |
|---|
AbstractBotLogger() |
| Modifier and Type | Method and Description |
|---|---|
BotLogEntryBuilder |
composeLogMessage()
Creates a builder which simplifies the message configuration
|
void |
debug(String message)
Logs a message at the DEBUG level
|
void |
debug(String message,
Throwable exception)
Logs an exception (throwable) at the DEBUG level with an accompanying message.
|
void |
error(String message)
Logs a message at the ERROR level
|
void |
error(String message,
Throwable exception)
Logs an exception (throwable) at the ERROR level with an accompanying message.
|
protected String |
formatLogEntry(BotLogEntry entry)
Base method to convert log entry to String.
|
protected DateFormat |
getDateFormat()
Return default date format
|
void |
info(String message)
Logs a message at the INFO level
|
void |
info(String message,
Throwable exception)
Logs an exception (throwable) at the INFO level with an accompanying message.
|
void |
log(BotLogEntry entry)
Writes log entry to logging stream
|
void |
log(BotLogSeverity severity,
String message,
Throwable exception)
Logs an exception with exact severity level with an accompanying message
|
void |
warn(String message)
Logs a message at the WARNING level
|
void |
warn(String message,
Throwable exception)
Logs an exception (throwable) at the WARNING level with an accompanying message.
|
protected abstract void |
writeToSink(BotLogEntry entry)
Customizable method which writes log entry to exact resource
|
public void debug(String message)
BotLoggerpublic void debug(String message, Throwable exception)
BotLoggerpublic void info(String message)
BotLoggerpublic void info(String message, Throwable exception)
BotLoggerpublic void warn(String message)
BotLoggerpublic void warn(String message, Throwable exception)
BotLoggerpublic void error(String message)
BotLoggerpublic void error(String message, Throwable exception)
BotLoggerpublic void log(BotLogSeverity severity, String message, Throwable exception)
BotLoggerpublic void log(BotLogEntry entry)
BotLoggerprotected String formatLogEntry(BotLogEntry entry)
entry - log entryprotected DateFormat getDateFormat()
protected abstract void writeToSink(BotLogEntry entry)
entry - log entrypublic BotLogEntryBuilder composeLogMessage()
composeLogMessage in interface BotLoggerBotLogEntryBuilder instanceCopyright © 2016. All rights reserved.