Loggability::Formatter::
Default class
| Superclass | Loggability::Formatter |
The default sprintf-based log formatter class.
Constants
- DEFAULT_DATETIME_FORMAT
The default sprintf pattern
- FORMAT
The format to output unless debugging is turned on
Attributes
- datetime_format RW
Strftime format for log messages
- format RW
Main log sprintf format
Public Class Methods
Initialize a new Loggability::Formatter. The specified logformat should be a sprintf pattern with positional placeholders:
%1$s
Time (pre-formatted using strftime with the datetime_format)
%2$d
Time microseconds
%3$d
PID
%4$s
Thread ID
%5$s
Severity
%6$s
Object/Program Name
%7$s
Message
Public Instance Methods
Create a log message from the given severity, time, progname, and message and return it.
Protected Instance Methods
Format the specified msg for output to the log.