Class: Merb::BootLoader::Logger

Inherits:
Merb::BootLoader show all
Defined in:
merb-core/lib/merb-core/bootloader.rb

Overview

Set up the logger.

Place the logger inside of the Merb log directory (set up in Merb::BootLoader::BuildFramework)

Class Method Summary (collapse)

Methods inherited from Merb::BootLoader

after, after_app_loads, before, before_app_loads, before_master_shutdown, before_worker_shutdown, default_framework, finished?, inherited, move_klass

Class Method Details

+ (nil) run

Sets Merb.logger to a new logger created based on the config settings.



186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'merb-core/lib/merb-core/bootloader.rb', line 186

def self.run
  Merb::Config[:log_level] ||= begin
    if Merb.environment == "production"
      Merb::Logger::Levels[:warn]
    else
      Merb::Logger::Levels[:debug]
    end
  end

  Merb::Config[:log_stream] = 
    Merb::Config[:original_log_stream] || Merb.log_stream
  nil
end