Hi Tore,

I am also using Jetty 7. My preference is to configure logging per app (instead 
of per container), so I am not very familiar with per-container options. I am 
using Log4J (you may use another logger, so configuration advise will be 
different) and not using any defaults, configuring logging "subsystem" 
explicitly in a startup servlet.

So... In the app I'd place log4j.properties either under WEB-INF/ or under 
WEB-INF/classes/ (doesn't mater as long as you can obtain a URL of this file 
either via ServletContext or ClassLoader). Then load this file into Properties 
object, then bootstrap Log4J PropertyConfigurator with these Properties. After 
that you can turn off the new logger by adding this line in log4j.properties:

log4j.logger.org.apache.cayenne.log.CommonsJdbcEventLogger = WARN


Andrus


On May 5, 2011, at 1:00 PM, Tore Halset wrote:
> Hello.
> 
> We are using 3.1M2 in jetty 7.3.0. For production I want to turn off the 
> logging done by CommonsJdbcEventLogger. I got this to work with earlier 
> versions of cayenne and a different servlet engine, but are stuck now. My log 
> files are growing with GBs each day.
> 
> I have tried this web page and added the log4j definition to 
> jetty/resources/log4j.properties
> https://cwiki.apache.org/confluence/display/CAYDOC30/Configuring+Logging and
> trunk/docs/doc/src/main/resources/doc/Documentation/Cayenne%20Guide/Deployment/Configuring%20Logging/index.html
> 
> Is this still valid for 3.1?
> 
> Regards,
> - Tore.

Reply via email to