Class: Log4r::SimpleFormatter

Inherits:
Formatter show all
Defined in:
lib/log4r/formatter/formatter.rb

Overview

SimpleFormatter produces output like this:

WARN loggername> Danger, Will Robinson, danger!

Does not write traces and does not inspect objects.

Direct Known Subclasses

BasicFormatter

Instance Method Summary collapse

Methods inherited from Formatter

#initialize

Constructor Details

This class inherits a constructor from Log4r::Formatter

Instance Method Details

#format(event) ⇒ Object



27
28
29
30
# File 'lib/log4r/formatter/formatter.rb', line 27

def format(event)
  sprintf("%*s %s> %s\n", MaxLevelLength, LNAMES[event.level], 
          event.name, event.data)
end