Module: ProcessObserver::Log

Defined in:
lib/process_observer/log.rb

Overview

Logging methods

Constant Summary collapse

@@loggers =

Loggers

{
  debug: Logger.new(STDOUT),
  warn: Logger.new(STDERR)
}

Class Method Summary collapse

Class Method Details

.debug(*args) ⇒ Object

Send debug message.



26
27
28
# File 'lib/process_observer/log.rb', line 26

def self.debug(*args)
  @@loggers[:debug].debug(args.join("\n")) if $DEBUG
end

.warn(*args) ⇒ Object

Send warning.



20
21
22
# File 'lib/process_observer/log.rb', line 20

def self.warn(*args)
  @@loggers[:warn].warn(args.join("\n"))
end