Class: DreamOps::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/dream-ops/logger.rb

Instance Method Summary collapse

Instance Method Details

#deprecate(message) ⇒ Object



5
6
7
8
# File 'lib/dream-ops/logger.rb', line 5

def deprecate(message)
  trace = caller.join("\n\t")
  warn "DEPRECATION WARNING: #{message}\n\t#{trace}"
end

#exception(ex) ⇒ Object

Log an exception and its backtrace to FATAL

Parameters:

  • ex (Exception)


13
14
15
16
# File 'lib/dream-ops/logger.rb', line 13

def exception(ex)
  fatal("#{ex.class}: #{ex}")
  fatal(ex.backtrace.join("\n")) unless ex.backtrace.nil?
end