Class: GitReport::GLogger
- Inherits:
-
Object
- Object
- GitReport::GLogger
- Defined in:
- lib/g_logger.rb
Class Method Summary collapse
-
.log(level, message) ⇒ Object
logs the given message in case the given level is less or equal the configured log level.
Class Method Details
.log(level, message) ⇒ Object
logs the given message in case the given level is less or equal the configured log level
6 7 8 9 10 11 |
# File 'lib/g_logger.rb', line 6 def self.log level, File.open( GitReport.configuration.logfile, File::WRONLY|File::APPEND|File::CREAT ){ |f| f.write( + "\n") } if level <= GitReport.configuration.loglevel end |