public class BasicMessageLogger extends Object implements MessageLogger
MessageBuilder and prints them to the standard
 output stream.System.out| Modifier and Type | Field and Description | 
|---|---|
static BasicMessageLogger | 
INSTANCE
An instance of BasicMessageLogger. 
 | 
| Constructor and Description | 
|---|
BasicMessageLogger()
Creates an instance using  
BasicMessageBuilder.INSTANCE to build the messages. | 
BasicMessageLogger(MessageBuilder builder)
Creates an instance passing the message builder used to build the messages. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
MessageBuilder | 
getMessageBuilder()
Gets the message builder used to build the messages. 
 | 
void | 
log(char level,
   String category,
   int id)
Logs a message. 
 | 
void | 
log(char level,
   String category,
   int id,
   Object... arguments)
Logs a message with arguments. 
 | 
void | 
log(char level,
   String category,
   int id,
   Throwable t)
Logs a message with a throwable. 
 | 
void | 
log(char level,
   String category,
   int id,
   Throwable t,
   Object... arguments)
Logs a message with a throwable and arguments. 
 | 
void | 
setMessageBuilder(MessageBuilder builder)
Sets the message builder used to build the messages. 
 | 
public static final BasicMessageLogger INSTANCE
public BasicMessageLogger()
BasicMessageBuilder.INSTANCE to build the messages.public BasicMessageLogger(MessageBuilder builder)
builder - the MessageBuilder to use, cannot be null.NullPointerException - if the given builder is null.public MessageBuilder getMessageBuilder()
MessageLoggergetMessageBuilder in interface MessageLoggerpublic void log(char level,
                String category,
                int id)
MessageLoggerlog in interface MessageLoggerlevel - the level of the message.category - the category of the message.id - the ID of the message.MessageBuilder.buildMessage(char, String, int)public void log(char level,
                String category,
                int id,
                Object... arguments)
MessageLoggerlog in interface MessageLoggerlevel - the level of the message.category - the category of the message.id - the ID of the message.arguments - the arguments.MessageBuilder.buildMessage(char, String, int, Object...)public void log(char level,
                String category,
                int id,
                Throwable t)
MessageLoggerlog in interface MessageLoggerlevel - the level of the message.category - the category of the message.id - the ID of the message.t - the throwable.MessageBuilder.buildMessage(char, String, int, Throwable)public void log(char level,
                String category,
                int id,
                Throwable t,
                Object... arguments)
MessageLoggerlog in interface MessageLoggerlevel - the level of the message.category - the category of the message.id - the ID of the message.t - the throwable.arguments - the arguments.MessageBuilder.buildMessage(char, String, int, Throwable, Object...)public void setMessageBuilder(MessageBuilder builder)
MessageLoggersetMessageBuilder in interface MessageLoggerbuilder - the message builder to set, cannot be null.