While using log4r
in Ruby, I wrote a configuration file similar to the following:
require 'rubygems'
require 'log4r'
require 'log4r/outputter/datefileoutputter'
SERVICE_LOG = {
:log_name => 'service',
:log_file => 'service.log',
:log_level => Log4r::DEBUG,
:message_pattern => "[%-5l %d] %C: %M",
:date_pattern => "%Y-%m-%d %H:%M:%S"
}
when I ran it, it threw out the following exception:
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant Log4r::DEBUG (NameError)
Why did it do that?