Class: Resat::LogFormatter
- Inherits:
-
Object
- Object
- Resat::LogFormatter
- Defined in:
- lib/log.rb
Instance Method Summary collapse
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/log.rb', line 30 def call(severity, time, progname, msg) msg.gsub!("\n", "\n ") res = "" res << "*** " if severity == Logger::ERROR || severity == Logger::FATAL res << "#{severity} [#{time.strftime('%H:%M:%S')}]: #{msg.to_s}\n" res end |