SimpleLayout consists of the level of the log statement, followed by " - " and then the log message itself. More...
Inherits log4cxx::Layout.
Classes | |
class | ClazzSimpleLayout |
Public Member Functions | |
virtual const helpers::Class & | getClass () const |
const void * | cast (const helpers::Class &clazz) const |
bool | instanceof (const helpers::Class &clazz) const |
virtual void | format (LogString &output, const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool) const |
Returns the log statement in a format consisting of the level , followed by " - " and then the message . | |
bool | ignoresThrowable () const |
The SimpleLayout does not handle the throwable contained within LoggingEvents. | |
virtual void | activateOptions (log4cxx::helpers::Pool &) |
Activate the options that were previously set with calls to option setters. | |
virtual void | setOption (const LogString &, const LogString &) |
Set option to value . | |
Static Public Member Functions | |
static const helpers::Class & | getStaticClass () |
static const log4cxx::helpers::ClassRegistration & | registerClass () |
SimpleLayout consists of the level of the log statement, followed by " - " and then the log message itself.
For example,
DEBUG - Hello world
PatternLayout offers a much more powerful alternative.
virtual void activateOptions | ( | log4cxx::helpers::Pool & | p | ) | [inline, virtual] |
Activate the options that were previously set with calls to option setters.
This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.
For example, the FileAppender has the File and Append options both of which are ambigous until the other is also set.
Implements OptionHandler.
const void* cast | ( | const helpers::Class & | clazz | ) | const [inline, virtual] |
Reimplemented from Layout.
virtual void format | ( | LogString & | output, | |
const spi::LoggingEventPtr & | event, | |||
log4cxx::helpers::Pool & | pool | |||
) | const [virtual] |
Returns the log statement in a format consisting of the level
, followed by " - " and then the message
.
For example,
INFO - "A message"
Implements Layout.
virtual const helpers::Class& getClass | ( | ) | const [virtual] |
Reimplemented from Layout.
static const helpers::Class& getStaticClass | ( | ) | [static] |
Reimplemented from Layout.
bool ignoresThrowable | ( | ) | const [inline, virtual] |
The SimpleLayout does not handle the throwable contained within LoggingEvents.
Thus, it returns true
.
Implements Layout.
bool instanceof | ( | const helpers::Class & | clazz | ) | const [inline, virtual] |
Reimplemented from Layout.
static const log4cxx::helpers::ClassRegistration& registerClass | ( | ) | [static] |
Reimplemented from Layout.
Set option
to value
.
The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions is called.
Implements OptionHandler.