Package ej.util.message.basic
Class OffMessageLogger
- java.lang.Object
-
- ej.util.message.basic.OffMessageLogger
-
- All Implemented Interfaces:
MessageLogger
public class OffMessageLogger extends Object implements MessageLogger
A message logger that does not print anything.
-
-
Field Summary
Fields Modifier and Type Field Description static OffMessageLoggerINSTANCEAn instance of OffMessageLogger.
-
Constructor Summary
Constructors Constructor Description OffMessageLogger()Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
INSTANCE
public static final OffMessageLogger INSTANCE
An instance of OffMessageLogger.
-
-
Method Detail
-
log
public void log(char level, String category, int id)Description copied from interface:MessageLoggerLogs a message.- Specified by:
login interfaceMessageLogger- Parameters:
level- the level of the message.category- the category of the message.id- the ID of the message.- See Also:
MessageBuilder.buildMessage(char, String, int)
-
log
public void log(char level, String category, int id, Throwable t)Description copied from interface:MessageLoggerLogs a message with a throwable.- Specified by:
login interfaceMessageLogger- Parameters:
level- the level of the message.category- the category of the message.id- the ID of the message.t- the throwable.- See Also:
MessageBuilder.buildMessage(char, String, int, Throwable)
-
log
public void log(char level, String category, int id, Object... arguments)Description copied from interface:MessageLoggerLogs a message with arguments.- Specified by:
login interfaceMessageLogger- Parameters:
level- the level of the message.category- the category of the message.id- the ID of the message.arguments- the arguments.- See Also:
MessageBuilder.buildMessage(char, String, int, Object...)
-
log
public void log(char level, String category, int id, Throwable t, Object... arguments)Description copied from interface:MessageLoggerLogs a message with a throwable and arguments.- Specified by:
login interfaceMessageLogger- 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.- See Also:
MessageBuilder.buildMessage(char, String, int, Throwable, Object...)
-
getMessageBuilder
public MessageBuilder getMessageBuilder()
Description copied from interface:MessageLoggerGets the message builder used to build the messages.- Specified by:
getMessageBuilderin interfaceMessageLogger- Returns:
- the message builder.
-
setMessageBuilder
public void setMessageBuilder(MessageBuilder builder)
Description copied from interface:MessageLoggerSets the message builder used to build the messages.- Specified by:
setMessageBuilderin interfaceMessageLogger- Parameters:
builder- the message builder to set, cannot benull.
-
-