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.



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

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

Instance Method Details

#exception(module_name, exception) ⇒ Object



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

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