I use Logback in my application hosted on the Websphere application server. Logback is configured to log into System Out (and others hesitate to switch to another file). The problem is that Websphere uses its own format to log into System Out. Running logger.debug("test")in my application gives:
[8/7/12 12:27:55:629 CDT] 0000003a SystemOut O DEBUG com.myapp... test
where everything up to "O" is added by Websphere. The rest is from the magazine
I installed Logback to use the following pattern: %-5level %logger{36} - %msg%nso that I do not repeat the timestamp and stream information that Websphere does on its own, but I'm still annoyed that I cannot fully configure logging to System Out from within Logback.
I donβt know much about leading best practices. I used to register in separate files using a web application, but for this project I was told that System Out files are controlled by a third party, and I should not change using System Out. Is there a way around my problem with these requirements in mind and tell Websphere not to mess with System Out, or is this the only solution to start logging into another file? Thank!
source
share