G
Georges Ko
Hi,
I'm writing an application that uses both Ruby's Logger and
ActiveRecord, but ActiveRecord seems to break Ruby's Logger, as
the Logger data (date, level, etc...) is not output anymore.
Below is an example:
$ cat testlog.rb
require "logger"
require "rubygems"
require_gem "activerecord"
log = Logger.new(STDOUT)
log.level = Logger:EBUG
log.info("Hello, world!")
$ ruby testlog.rb
Hello, world!
versus
$ ruby testlog2.rb
require "logger"
require "rubygems"
######### require_gem "activerecord"
log = Logger.new(STDOUT)
log.level = Logger:EBUG
log.info("Hello, world!")
$ ruby testlog2.rb
I, [2006-07-12T18:26:13.556000 #4228] INFO -- : Hello, world!
To make it normal, I have to load "logger" after require_gem
"activerecord" (with warning messages output)...
What do I miss?
Georges
I'm writing an application that uses both Ruby's Logger and
ActiveRecord, but ActiveRecord seems to break Ruby's Logger, as
the Logger data (date, level, etc...) is not output anymore.
Below is an example:
$ cat testlog.rb
require "logger"
require "rubygems"
require_gem "activerecord"
log = Logger.new(STDOUT)
log.level = Logger:EBUG
log.info("Hello, world!")
$ ruby testlog.rb
Hello, world!
versus
$ ruby testlog2.rb
require "logger"
require "rubygems"
######### require_gem "activerecord"
log = Logger.new(STDOUT)
log.level = Logger:EBUG
log.info("Hello, world!")
$ ruby testlog2.rb
I, [2006-07-12T18:26:13.556000 #4228] INFO -- : Hello, world!
To make it normal, I have to load "logger" after require_gem
"activerecord" (with warning messages output)...
What do I miss?
Georges