Class: ConsoleAppender


ConsoleAppender extends SimpleLogAppender printing messages on the console.

new ConsoleAppender(level, category)

Constructor for ConsoleAppender.
Name Type Argument Description
level String <optional>
The threshold level at which the SimpleLogAppender is created. It should be one of "DEBUG", "INFO", "WARN", "ERROR" and "FATAL". If not or wrongly specified INFO is assumed.
category String <optional>
The category this appender should listen to. If not specified the appender will get log for every available category. See SimpleLogAppender#setCategoryFilter.
if the environment does not have any console object or if such console is currently inaccessible.


Method Summary

Publish a log message on the console.

Inherited Methods

composeLine getCategoryFilter getLevel setCategoryFilter setLevel setLoggerProvider

Method Detail

log(category, level, mex, header)

Publish a log message on the console.
Name Type Description
category String the logger category that produced the given message.
level String the logging level of the given message. It should be one of DEBUG INFO WARN ERROR FATAL.
mex String the message to be logged. It could be a String instance, an Error instance or any other object, provided that it has a toString method.
header String a header for the message