Class: Floe::CLI::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/floe/cli/logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



10
11
12
13
14
15
16
17
18
# File 'lib/floe/cli/logger.rb', line 10

def initialize(...)
  super

  original_formatter = formatter || ::Logger::Formatter.new
  self.formatter = proc do |severity, time, progname, msg|
    prefix = execution_id ? "[#{execution_id}] " : ""
    original_formatter.call(severity, time, progname, "#{prefix}#{msg}")
  end
end

Instance Attribute Details

#execution_idObject

Returns the value of attribute execution_id.



8
9
10
# File 'lib/floe/cli/logger.rb', line 8

def execution_id
  @execution_id
end