1

Is it possible to change log4j trace level without restart of WebLogic or GlassFish?
We use -Dlog4j.configuration JVM argument to set log4j config file.
And now neither WebLogic or GlassFish reloads changes if log4j.xml was modified.

In JBoss(at least in JBoss 5.1) there is service org.jboss.logging.Log4jService which allows to set how frequently in seconds the log4j configuration file is checked for changes.
Is there something like this in WebLogic and GlassFish?

Volodymyr Bezuglyy
  • 16,295
  • 33
  • 103
  • 133

1 Answers1

0

Yes it is possible.There is more than one approach depending on what you are doing with your app.

You can change it in the admin console by going to the managed server's logging tab. This is for the server output itself, not for apps running on the server.

Using WLST check here (it will involve a fair amount of work): http://www.theserverlabs.com/blog/2010/04/22/dynamically-changing-log-level-with-weblogic-log4j-jmx-and-wlst/

Setting it via code in an app: Dynamically Changing log4j log level

Community
  • 1
  • 1
Display Name is missing
  • 6,197
  • 3
  • 34
  • 46