Class: Logger::Formatter
Direct Known Subclasses
Constant Summary collapse
- Format =
"%s, [%s#%d] %5s -- %s: %s\n"
Instance Attribute Summary collapse
-
#datetime_format ⇒ Object
Returns the value of attribute datetime_format.
Instance Method Summary collapse
- #call(severity, time, progname, msg) ⇒ Object
-
#initialize ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize ⇒ Formatter
Returns a new instance of Formatter.
62 63 64 |
# File 'lib/inactive_support/clean_logger.rb', line 62 def initialize @datetime_format = nil end |
Instance Attribute Details
#datetime_format ⇒ Object
Returns the value of attribute datetime_format.
60 61 62 |
# File 'lib/inactive_support/clean_logger.rb', line 60 def datetime_format @datetime_format end |
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
66 67 68 69 |
# File 'lib/inactive_support/clean_logger.rb', line 66 def call(severity, time, progname, msg) Format % [severity[0..0], format_datetime(time), $$, severity, progname, msg2str(msg)] end |