Class: Inferno::Logger
- Inherits:
-
Object
- Object
- Inferno::Logger
- Defined in:
- lib/inferno/logger.rb
Instance Method Summary collapse
-
#initialize(notifications) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(notifications) ⇒ Logger
Returns a new instance of Logger.
6 7 8 9 10 11 12 |
# File 'lib/inferno/logger.rb', line 6 def initialize(notifications) @logger = ::Logger.new(STDOUT) @logger.formatter = proc do |severity, datetime, progname, msg| msg + "\n" end notifications.on("triggered.event", self) { |payload| @logger.info "Triggered: #{payload[:event].inspect} with payload: #{payload[:payload].inspect}" } end |