org.as2lib.core.BasicClass +--org.as2lib.env.log.stringifier.PatternLogMessageStringifier
Stringifier
PatternLogMessageStringifier
stringifies LogMessage instances
based on configuration and a pattern.
public function PatternLogMessageStringifier(showLevel:Boolean, showLoggerName:Boolean, timeFormat:String)
Constructs a new PatternLogMessageStringifier
instance.
Level and logger name are shown by default.
If timeFormat
is not passed-in or is null
the date-time is not
shown in the log message.
showLevel | determines whether to show levels in the string representation |
timeFormat | (optional) the time format pattern used to format the time stamp |
public function execute(target):String
Returns the string representation of the passed-in LogMessage instance.
The returned string is composed as follows:
theTime theLogLevel theLoggerName - theMessage
Depending on your custom settings, which information to show and which not, a few parts may be left out.
target | the LogMessage instance to stringify
|
the string representation of the passed-in target