Reputation: 993
I have a WebSphere application which uses some third party libraries which write HTTP traffic into System.out
/ PrintWriter
. WLP by default writes those messages into the messages.log file. I want to disable this as there may be sensible data in the HTTP traffic which I don't want to be logged.
In the documentation I only see the setting for the console.log LogLevel, but not for the messages.log. Is there a way to set the LogLevel for this file or to just disable it?
Upvotes: 2
Views: 503
Reputation: 276
There's no way of configuring Liberty to not store System.out messages in the messages.log file.
I see from your comments above that you have found a solution for this particular case. For others reading this, if you were really stuck you could write your own PrintStream and use System.setOut(printStream)
to filter what actually goes to stdout. Your PrintStream could implement a filter at the start of all print methods before delegating to the Liberty printStream.
PrintStream libertyPrintStream = System.out;
PrintStream myPrintStream = new MyPrintStream(libertyPrintStream);
System.setOut(myPrintStream);
Upvotes: 2