Class: Dropper::Logger
- Inherits:
-
Object
- Object
- Dropper::Logger
- 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
-
.outpath ⇒ Object
Returns the value of attribute outpath.
Class Method Summary collapse
-
.debug(msg) ⇒ Object
Log Debug.
-
.error(msg) ⇒ Object
Log Error.
-
.fatal(msg) ⇒ Object
Log Fatal.
-
.info(msg) ⇒ Object
Log Info.
- .loggers ⇒ Object
-
.warn(msg) ⇒ Object
Log Warn.
Class Attribute Details
.outpath ⇒ Object
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
23 24 25 |
# File 'lib/dropper/logger.rb', line 23 def debug(msg) log(:debug, msg) end |
.error(msg) ⇒ Object
Log Error
41 42 43 |
# File 'lib/dropper/logger.rb', line 41 def error(msg) log(:error, msg) end |
.fatal(msg) ⇒ Object
Log Fatal
29 30 31 |
# File 'lib/dropper/logger.rb', line 29 def fatal(msg) log(:fatal, msg) end |
.info(msg) ⇒ Object
Log Info
17 18 19 |
# File 'lib/dropper/logger.rb', line 17 def info(msg) log(:info, msg) end |
.loggers ⇒ Object
11 12 13 |
# File 'lib/dropper/logger.rb', line 11 def loggers @loggers ||= build_loggers end |
.warn(msg) ⇒ Object
Log Warn
35 36 37 |
# File 'lib/dropper/logger.rb', line 35 def warn(msg) log(:warn, msg) end |