Class: GlobalLogger
- Includes:
- Singleton
- Defined in:
- lib/a_little_less/global_logger.rb
Constant Summary collapse
- SHOW_DIV =
false
Instance Method Summary collapse
-
#initialize ⇒ GlobalLogger
constructor
A new instance of GlobalLogger.
- #log(level, *args) ⇒ Object
Constructor Details
#initialize ⇒ GlobalLogger
Returns a new instance of GlobalLogger.
6 7 8 |
# File 'lib/a_little_less/global_logger.rb', line 6 def initialize @logger = build_logger end |
Instance Method Details
#log(level, *args) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/a_little_less/global_logger.rb', line 10 def log level, *args @level = level @caller = caller[1] div if SHOW_DIV args.each{|line| log_line line } nil end |