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, default_framework, finished?, inherited, move_klass

Class Method Details



150
151
152
153
154
# File 'lib/merb-core/bootloader.rb', line 150

def self.print_warnings
  if Gem::Version.new(Gem::RubyGemsVersion) < Gem::Version.new("1.1")
    Merb.logger.warn! "Merb requires Rubygems 1.1 and later. Please upgrade RubyGems with gem update --system."
  end
end

.runObject

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



145
146
147
148
# File 'lib/merb-core/bootloader.rb', line 145

def self.run
  Merb.logger = Merb::Logger.new(Merb.log_file, Merb::Config[:log_level], Merb::Config[:log_delimiter], Merb::Config[:log_auto_flush])
  print_warnings
end