views:

168

answers:

1

I need to change the log format of my rails app.

I put this file in lib directory and required it in development.rb env file.

require 'hodel_3000_compliant_logger'  
config.logger = Hodel3000CompliantLogger.new(config.log_path)

and I should get the output of the development.log file as follows:

Jun 28 03:05:13 millisami-notebook rails[18243]: Memory usage: 86888 |
PID: 18243

I get this exact log when I start my app with script/server (Mongrel). But when I run the app via Passenger, the format being logged is Rails' default.

Why doesn't Passenger write to the log file like Mongrel does?

A: 

Because Passenger runs your Rails app in production mode, and you've only configured the logger in development mode. Copy your configuration over to the production.rb environment file.

Jim Puls
Thats not the case.I'm running this in my local Ubuntu and I've setup the RailsEnv to development in vhost and its for sure running in development mode.
Millisami