Module: Krakow::Utils::Logging
- Included in:
- Lazy
- Defined in:
- lib/krakow/utils/logging.rb
Overview
Logging helpers
Class Method Summary collapse
-
.level=(level) ⇒ Integer?
Set the logging output level.
Instance Method Summary collapse
-
#log(*args) ⇒ Logger?
Log message.
Class Method Details
.level=(level) ⇒ Integer?
Set the logging output level
34 35 36 37 38 |
# File 'lib/krakow/utils/logging.rb', line 34 def level=(level) if(Celluloid.logger.class == Logger) Celluloid.logger.level = Logger.const_get(level.to_s.upcase.to_sym) end end |
Instance Method Details
#log(*args) ⇒ Logger?
Log message
19 20 21 22 23 24 25 26 27 |
# File 'lib/krakow/utils/logging.rb', line 19 def log(*args) if(args.empty?) Celluloid::Logger else severity, string = args Celluloid::Logger.send(severity.to_sym, "#{self}: #{string}") nil end end |