[logback-user] Change log level at runtime

Nikolas Everett nik9000 at gmail.com
Wed Jul 8 14:51:14 CEST 2009


You can do that.  See here:  http://logback.qos.ch/manual/jmxConfig.html  I
typically change my logback configuration file on the file system then use
jconsole to request that logback reload it.

You may have to jump through some hoops to get jconsole to connect to a
running application server.  I stuff these in my .bashrc on development box
to make it simple:
  CATALINA_OPTS="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=localhost"
  export CATALINA_OPTS
Thats about the lease secure way you could setup JMX, but it gets the job
done for development.


Just as a side note, http://logback.qos.ch/manual/index.html links to
http://logback.qos.ch/manual/jmxConfig.html as
http://logback.qos.ch/manual/jmxConfigurator.html which 404s.

On Wed, Jul 8, 2009 at 5:35 AM, alex <alessandro.fustini at dnshosting.it>wrote:

> Hi,
> Is it possible to change at runtime (with no restart the server) the log
> level for an appender (for example from error to info) ?
> If yes is it possible to have some code hints ?
>
> Thanks a lot for all help
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20090708/86df2e70/attachment.htm>


More information about the Logback-user mailing list