Class: Fastr::Log::Formatter
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- Fastr::Log::Formatter
- Defined in:
- lib/fastr/logger.rb,
lib/fastr/test/logger.rb
Instance Attribute Summary collapse
-
#progname ⇒ Object
Returns the value of attribute progname.
Instance Method Summary collapse
- #call(severity, time, progname, msg) ⇒ Object
-
#initialize(name) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(name) ⇒ Formatter
Returns a new instance of Formatter.
48 49 50 |
# File 'lib/fastr/logger.rb', line 48 def initialize(name) self.progname = name end |
Instance Attribute Details
#progname ⇒ Object
Returns the value of attribute progname.
46 47 48 |
# File 'lib/fastr/logger.rb', line 46 def progname @progname end |
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
53 54 55 |
# File 'lib/fastr/logger.rb', line 53 def call(severity, time, progname, msg) puts "[#{severity}] [#{self.progname}]: #{msg}" end |