soroe
February 23, 2008, 2:29am
1
Hey Guys,
I’m running a script that accesses Rails models via script/runner. I
want to accumulate the log message in a different logfile to avoid
polluting the development/test/production.log files. I’ve tried both to
no avail:
ActiveRecord::Base.logger = Logger.new(filename)
ActionController::Base.logger = Logger.new(filename)
logger = = Logger.new(filename)
In all cases, the log messages continue to appear in the
development/test/production.log file.
Any pointers would be appreciated.
Sonny.
soroe
February 23, 2008, 8:50pm
2
Sonny C. wrote:
Hey Guys,
Any pointers would be appreciated.
Sonny.
you can change it through the config in environment/config.rb
try: config.logger = Logger.new(‘logger path’, Logger::DEBUG)
hth
ilan
soroe
February 23, 2008, 11:13pm
3
you can change it through the config in environment/config.rb
try: config.logger = Logger.new(‘logger path’, Logger::DEBUG)
Thanks for the suggestion but no better luck:"( I’m running my script
through script/runner incidentally…