Class: RuGUI::LogSupport::Formatter
Instance Method Summary collapse
- #call(severity, timestamp, progname, msg) ⇒ Object
-
#initialize(classname = nil) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(classname = nil) ⇒ Formatter
Returns a new instance of Formatter.
29 30 31 |
# File 'lib/rugui/log_support.rb', line 29 def initialize(classname = nil) @classname = classname end |
Instance Method Details
#call(severity, timestamp, progname, msg) ⇒ Object
33 34 35 36 |
# File 'lib/rugui/log_support.rb', line 33 def call(severity, , progname, msg) = .strftime(RuGUI.configuration.logger[:format] || "%Y-%m-%d %H:%M:%S") "#{} (#{severity}) (#{@classname}) #{msg}\n" end |