Saeide
Saeide

Reputation: 81

Websphere Configuration to Avoid Unwated Warnings in SystemOut.log File

I have a problem about logging in SystemOut.log with Websphere. Can someone help me?

I’m getting some unwanted warning written in the SystemOut.log file with Websphere Application Server (WAS). All of the warnings are being generated by OGNL (ognl.NoSuchPropertyException). These exceptions don’t affect the code flow. Hence I need to turn off the logging of these warnings.
Also I have configuration in log4j.properties file to control the filtration of the log messages to error. It would be a great help if anyone can help what configuration I should do in WAS to avoid logging these warnings.

Regards

Upvotes: 2

Views: 2105

Answers (2)

Isaac
Isaac

Reputation: 16736

First, you have to determine what running component, inside your WAS instance, is generating these warning messages. Is it WebSphere itself, logging these warnings internally? or is it your code?

If the source is WebSphere, then perhaps, before setting the logging level to "error" or "severe", you may want to open a PMR with IBM. I never encountered OGNL warnings generated by WebSphere itself. These warnings, then, can be indicative of a problem in your WebSphere installation.

If the source is your application, then the way to cope with this situation depends on how OGNL, internally, is generating these messages:

  • If OGNL is simply writing log lines to System.out, then there's nothing you can do to suppress these lines.
  • If OGNL is logging through Log4J, then you should be able to set the log level of the OGNL logger(s) through your log4j.properties. If your log4j.properties changes aren't reflected, then it means that you have a classloading problem of some sort (the log4j.properties file being loaded by a different classloader than the one used to load your web application).
  • If OGNL is using a different logging framework (such as SLF4J or Commons Logging), then you'll have to read through the documentation of these frameworks to learn how to tune the logging level.

Upvotes: 1

Devesh
Devesh

Reputation: 2054

You can change the log level from WAS admin console. Servers->WAS->servername->troubleshooting->change log details level

Follow the path and you will see options to filter warning. For example to filer message from com.ibm.ws.*=WARN will filter all but WARN. Hope this helps.

Upvotes: 2

Related Questions