Class: Merb::BootLoader::Logger

Inherits:
Merb::BootLoader show all
Defined in:
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

.runObject

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

Returns

nil

:api: plugin



209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/merb-core/bootloader.rb', line 209

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