Class: Fastr::Log::Formatter

Inherits:
Logger::Formatter
  • Object
show all
Defined in:
lib/fastr/logger.rb,
lib/fastr/test/logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#prognameObject

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