Class: Dropper::Logger

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

Overview

Dropper::Logger handles all the logging for the application. By default it will just log to STDOUT, but if you set an outpath (Dropper::Logger.outpath = “filename”) then this class will log to both STDOUT and the given file.

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.outpathObject

Returns the value of attribute outpath.



9
10
11
# File 'lib/dropper/logger.rb', line 9

def outpath
  @outpath
end

Class Method Details

.debug(msg) ⇒ Object

Log Debug

Parameters:

  • msg (String)

    The message to be logged



23
24
25
# File 'lib/dropper/logger.rb', line 23

def debug(msg)
  log(:debug, msg)
end

.error(msg) ⇒ Object

Log Error

Parameters:

  • msg (String)

    The message to be logged



41
42
43
# File 'lib/dropper/logger.rb', line 41

def error(msg)
  log(:error, msg)
end

.fatal(msg) ⇒ Object

Log Fatal

Parameters:

  • msg (String)

    The message to be logged



29
30
31
# File 'lib/dropper/logger.rb', line 29

def fatal(msg)
  log(:fatal, msg)
end

.info(msg) ⇒ Object

Log Info

Parameters:

  • msg (String)

    The message to be logged



17
18
19
# File 'lib/dropper/logger.rb', line 17

def info(msg)
  log(:info, msg)
end

.loggersObject



11
12
13
# File 'lib/dropper/logger.rb', line 11

def loggers
  @loggers ||= build_loggers
end

.warn(msg) ⇒ Object

Log Warn

Parameters:

  • msg (String)

    The message to be logged



35
36
37
# File 'lib/dropper/logger.rb', line 35

def warn(msg)
  log(:warn, msg)
end