Class: DynamoAutoscale::StandardFormatter
- Inherits:
-
Object
- Object
- DynamoAutoscale::StandardFormatter
- Defined in:
- lib/dynamo-autoscale/standard_formatter.rb
Instance Method Summary collapse
- #call(severity, time, progname, msg) ⇒ Object
-
#initialize ⇒ StandardFormatter
constructor
A new instance of StandardFormatter.
Constructor Details
#initialize ⇒ StandardFormatter
Returns a new instance of StandardFormatter.
3 4 5 |
# File 'lib/dynamo-autoscale/standard_formatter.rb', line 3 def initialize @formatter = ::Logger::Formatter.new end |
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/dynamo-autoscale/standard_formatter.rb', line 7 def call(severity, time, progname, msg) table = DynamoAutoscale.current_table msg = "[#{table.name}] #{msg}" if table @formatter.call(severity, time, progname, msg) end |