Class: Syspy::Log
- Inherits:
-
Object
- Object
- Syspy::Log
- Defined in:
- lib/log.rb
Constant Summary collapse
- LOG_FILE =
"syspy.log"
- LOGGERS =
[]
- STDOUT_LOG =
Logger.new(STDOUT)
Class Method Summary collapse
- .debug(message) ⇒ Object
- .error(message) ⇒ Object
-
.fatal(message) ⇒ Object
LOGGERS << FILE_LOG.
- .info(message) ⇒ Object
- .log(severity, message) ⇒ Object
- .warn(message) ⇒ Object
Class Method Details
.debug(message) ⇒ Object
34 35 36 |
# File 'lib/log.rb', line 34 def self.debug() self.log(Logger::DEBUG,) end |
.error(message) ⇒ Object
22 23 24 |
# File 'lib/log.rb', line 22 def self.error() self.log(Logger::ERROR,) end |
.fatal(message) ⇒ Object
LOGGERS << FILE_LOG
18 19 20 |
# File 'lib/log.rb', line 18 def self.fatal() self.log(Logger::FATAL,) end |
.info(message) ⇒ Object
30 31 32 |
# File 'lib/log.rb', line 30 def self.info() self.log(Logger::INFO,) end |
.log(severity, message) ⇒ Object
38 39 40 41 42 |
# File 'lib/log.rb', line 38 def self.log(severity,) LOGGERS.each(){|logger| logger.log(severity,) } end |
.warn(message) ⇒ Object
26 27 28 |
# File 'lib/log.rb', line 26 def self.warn() self.log(Logger::WARN,) end |