Reputation: 681
I follow several direction and none of them seems to be working. Here are my specific question. 1. What jars to include in lib directory? 2. Where should I put the log4j.properties? What it should look like? 3. How did rails know to use log4j? None of the direction mentioned that I need to change environment.rb or environments/production.rb to change the logger configuration. How did rails know to use log4j? Many thanks.
Upvotes: 0
Views: 917
Reputation: 3315
To tell Rails about log4j, set the context init parameter jruby.rack.logging
to log4j
:
<context-param> <param-name>jruby.rack.logging</param-name> <param-value>log4j</param-value> </context-param>
Then JRuby-Rack will set the Rails logger to use log4j at startup.
Upvotes: 2