Class: TCellAgent::RubyLogger

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

Overview

Note: since the agent waits until native agent is available, this is only used in errors throwned while the agent is instrumenting or starting up so it’s ok to send those to STDOUT always

Instance Method Summary collapse

Constructor Details

#initializeRubyLogger

Returns a new instance of RubyLogger.



40
41
42
# File 'lib/tcell_agent/logger.rb', line 40

def initialize
  @logger = Logger.new(STDOUT)
end

Instance Method Details

#exception(module_name, exception) ⇒ Object



44
45
46
# File 'lib/tcell_agent/logger.rb', line 44

def exception(module_name, exception)
  @logger.debug("#{module_name} #{exception.backtrace.join("\n")}")
end