Module Waves::Logger
In: lib/runtime/logger.rb

Methods

config   level   method_missing   output   start  

Public Class methods

Returns the active configuration for the logger.

[Source]

    # File lib/runtime/logger.rb, line 12
12:     def self.config ; @config ||= Waves.config.log ; end

Returns the logging level used to filter logging events.

[Source]

    # File lib/runtime/logger.rb, line 15
15:     def self.level ; @level ||= ::Logger.const_get( config[:level].to_s.upcase || 'INFO' ) ; end

Forwards logging methods to the logger.

[Source]

    # 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

Returns the object being used for output by the logger.

[Source]

   # File lib/runtime/logger.rb, line 7
7:     def self.output
8:       @output ||= ( config[:output] or $stderr )
9:     end

Starts the logger, using the active configuration to initialize it.

[Source]

    # 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

[Validate]