Robert La Ferla-6 wrote:
Benjamin Muschko wrote:
> I think your best bet is to use JMX. Making your logger manageable let's you
> change the log level for certain packages at runtime without having to
> restart the container. To make this work write a class and make it
> manageable using Spring annotations or the MBeanExporter. You got to start
> your Tomcat JVM with the required JMX startup parameters.
>
> As far as I know the JMX Plugin already does all the work for you:
>
http://www.grails.org/JMX+Plugin.
>
Is there a simpler way of doing this without JMX?
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
You have to create log4j.properties and put it in <path to your web-applications>/WEB-INF/classes/log4j.properties
For example (I use it for debuging purpose):
----------
log4j.rootLogger = ERROR
log4j.appender.debug = org.apache.log4j.FileAppender
log4j.appender.debug.file = ${catalina.home}/logs/debug.log
log4j.appender.debug.layout = org.apache.log4j.PatternLayout
log4j.appender.debug.layout.ConversionPattern = %d{ISO8601} [%t] %5p %c{2}:%M - %m%n
log4j.logger.grails.app.task = DEBUG, debug
log4j.logger.grails.app.service = DEBUG, debug
----------