Class: Giblog
- Inherits:
-
Object
- Object
- Giblog
- Defined in:
- lib/giblish/utils.rb
Overview
The logger used from within giblish
Defined Under Namespace
Classes: GiblogFormatter
Class Method Summary collapse
-
.logger ⇒ Object
returns the application-wide logger instance.
-
.setup ⇒ Object
bootstrap the application-wide logger object.
Class Method Details
.logger ⇒ Object
returns the application-wide logger instance.
23 24 25 26 27 28 29 30 |
# File 'lib/giblish/utils.rb', line 23 def self.logger unless defined? @logger puts "!!!! Error: Trying to access logger before setup !!!!" puts caller exit end @logger end |
.setup ⇒ Object
bootstrap the application-wide logger object
15 16 17 18 19 20 |
# File 'lib/giblish/utils.rb', line 15 def self.setup return if defined? @logger @logger = Logger.new($stdout) @logger.formatter = GiblogFormatter.new end |