Package ej.util.message
Interface MessageLogger
-
- All Known Implementing Classes:
BasicMessageLogger,FilterMessageLogger,OffMessageLogger
public interface MessageLoggerA message logger logs simple messages based on integer IDs to avoid using Strings.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MessageBuildergetMessageBuilder()Gets the message builder used to build the messages.voidlog(char level, String category, int id)Logs a message.voidlog(char level, String category, int id, Object... arguments)Logs a message with arguments.voidlog(char level, String category, int id, Throwable t)Logs a message with a throwable.voidlog(char level, String category, int id, Throwable t, Object... arguments)Logs a message with a throwable and arguments.voidsetMessageBuilder(MessageBuilder builder)Sets the message builder used to build the messages.
-
-
-
Method Detail
-
getMessageBuilder
MessageBuilder getMessageBuilder()
Gets the message builder used to build the messages.- Returns:
- the message builder.
-
setMessageBuilder
void setMessageBuilder(MessageBuilder builder)
Sets the message builder used to build the messages.- Parameters:
builder- the message builder to set, cannot benull.
-
log
void log(char level, String category, int id)Logs a message.- Parameters:
level- the level of the message.category- the category of the message.id- the ID of the message.- Throws:
NullPointerException- if the given category isnull.- See Also:
MessageBuilder.buildMessage(char, String, int)
-
log
void log(char level, String category, int id, Throwable t)Logs a message with a throwable.- Parameters:
level- the level of the message.category- the category of the message.id- the ID of the message.t- the throwable.- Throws:
NullPointerException- if the given category isnull.- See Also:
MessageBuilder.buildMessage(char, String, int, Throwable)
-
log
void log(char level, String category, int id, Object... arguments)Logs a message with arguments.- Parameters:
level- the level of the message.category- the category of the message.id- the ID of the message.arguments- the arguments.- Throws:
NullPointerException- if the given category isnull.- See Also:
MessageBuilder.buildMessage(char, String, int, Object...)
-
log
void log(char level, String category, int id, Throwable t, Object... arguments)Logs a message with a throwable and arguments.- Parameters:
level- the level of the message.category- the category of the message.id- the ID of the message.t- the throwable.arguments- the arguments.- Throws:
NullPointerException- if the given category isnull.- See Also:
MessageBuilder.buildMessage(char, String, int, Throwable, Object...)
-
-