Class: StrftimeLogger::LtsvFormatter
- Inherits:
-
Object
- Object
- StrftimeLogger::LtsvFormatter
- Defined in:
- lib/strftime_logger/ltsv_formatter.rb
Instance Method Summary collapse
- #call(severity, message = nil, &block) ⇒ Object
-
#initialize(opts = {}) ⇒ LtsvFormatter
constructor
A new instance of LtsvFormatter.
Constructor Details
#initialize(opts = {}) ⇒ LtsvFormatter
Returns a new instance of LtsvFormatter.
5 6 |
# File 'lib/strftime_logger/ltsv_formatter.rb', line 5 def initialize(opts={}) end |
Instance Method Details
#call(severity, message = nil, &block) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/strftime_logger/ltsv_formatter.rb', line 8 def call(severity, = nil, &block) if .nil? if block_given? = yield else = "" end end time = Time.now.iso8601 "time:#{time}\t#{()}\n" end |