Management logging level through the WebSphere admin console

I have a web application in which I use java.util.logging. In my logging.properties file, the default level is information. I have loggers in my application for all levels of logging (information, debugging, fatal, etc.). This web application will be deployed to WebSphere 8.

What if I want to change the level of logging, say, from information to error, application through the WAS admin console at run time? How can I achieve this?

+6
source share
2 answers

Log in to the WAS admin console and click "Troubleshoot" → "Logs and Tracing" → your server → Diagnostic Tracing Service → Change the log level settings.

There you can add your own log levels, for example.

com.example.test.*=all 

You can change it forever, or you can dynamically change log levels at runtime (Runtime tab). Log levels are separated by a ":" symbol.

+5
source

In addition to Magic Wand, answer:

  • The changes on the Configuration tab are valid after the server is rebooted.
  • Changes in the Runtime tab are valid only until the server is rebooted, if you did not check Save runtime changes to configuration as well
  • You can enter a trace string in the text area or select it using the Components tree (your packages may not be visible if classes are not already loaded)
  • All messages with fine, finer, finest levels will go to trace.log not to SystemOut.log .
+5
source

Source: https://habr.com/ru/post/976039/


All Articles