Class: RubyAMF::Logger

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

Overview

:nodoc:

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object

Send every other method call to internally wrapped logger



13
14
15
# File 'lib/rubyamf/logger.rb', line 13

def method_missing name, *args
  logger.send(name, args)
end

Instance Method Details

#log_error(e) ⇒ Object

Log exceptions in rails-style, with cleaned backtrace if available



6
7
8
9
10
# File 'lib/rubyamf/logger.rb', line 6

def log_error e
  msg = "#{e.class} (#{e.message}):\n  "
  msg += clean_backtrace(e).join("\n  ")
  logger.fatal(msg)
end