Class: Pakyow::Logger::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/pakyow/logger/formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ Formatter

Returns a new instance of Formatter.



8
9
10
# File 'lib/pakyow/logger/formatter.rb', line 8

def initialize(output)
  @output = output
end

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



6
7
8
# File 'lib/pakyow/logger/formatter.rb', line 6

def output
  @output
end

Instance Method Details

#call(event, **options) ⇒ Object



12
13
14
15
# File 'lib/pakyow/logger/formatter.rb', line 12

def call(event, **options)
  event = yield if block_given?
  format(event, **options)
end

#verbose!(value) ⇒ Object



17
18
19
# File 'lib/pakyow/logger/formatter.rb', line 17

def verbose!(value)
  @verbose = value
end