| Module | Waves::Logger |
| In: |
lib/runtime/logger.rb
|
Returns the active configuration for the logger.
# File lib/runtime/logger.rb, line 12
12: def self.config ; @config ||= Waves.config.log ; end
Forwards logging methods to the logger.
# File lib/runtime/logger.rb, line 28
28: def self.method_missing(name,*args,&block)
29: @log.send name,*args, &block if @log
30: end
Starts the logger, using the active configuration to initialize it.
# File lib/runtime/logger.rb, line 18
18: def self.start
19: @log = config[:rotation] ?
20: ::Logger.new( output, config[:rotation].to_sym ) :
21: ::Logger.new( output )
22: @log.level = level
23: @log.datetime_format = "%Y-%m-%d %H:%M:%S "
24: self
25: end