Merrill
Consultant, Sima Solutions
Originally posted by Merrill Higginson:
Just set the Struts logger level to some high level such as ERROR. Example:
Why, did you run into that problem when you tried it? To me it looks like it sets the logging level for Struts to ERROR and leaves other applications alone. But if you tried it and that isn't what it did, then correct me.Originally posted by Jerry Lee:
That works, but not an acceptable solution for my boss.
What if we want to see other logs at "debug" level?
Originally posted by Jerry Lee:
Recently, we moved our Websphere Application Server from IBM OS/400 to Redhat Linux.
After the move, the Log4J prints out the messages of Struts framework that we never had before, shown at the bottom:
I am sure we didn't change the logging levels in log4j.properties.
My question is how we could stop Log4J to print the messages of Struts framework.
I googled it and I couldn't find the anwser. Thanks.
SystemOut O DEBUG (RequestUtils.java:1821) - Module name found: default
SystemOut O DEBUG (RequestProcessor.java:225) - Processing a 'GET' for path '/portal'
SystemOut O DEBUG (RequestUtils.java:764) - Looking for ActionForm bean instance in scope 'request' under attribute key 'loginForm'
SystemOut O DEBUG (RequestUtils.java:839) - Creating new ActionForm instance of type 'portalweb.forms.LoginForm'
SystemOut O DEBUG (RequestUtils.java:844) - --> portalweb.forms.LoginForm@28562856
SystemOut O DEBUG (RequestProcessor.java:372) - Storing ActionForm bean instance in scope 'request' under attribute key 'loginForm'
SystemOut O DEBUG (RequestProcessor.java:813) - Populating bean properties from this request
SystemOut O DEBUG (BeanUtils.java:792) - BeanUtils.populate(portalweb.forms.LoginForm@28562856, {})
SystemOut O DEBUG (RequestProcessor.java:940) - Validating input form properties
SystemOut O DEBUG (RequestProcessor.java:945) - No errors detected, accepting input
SystemOut O DEBUG (RequestProcessor.java:305) - Looking for Action instance for class portalweb.actions.PortalAction
SystemOut O DEBUG (RequestProcessor.java:315) - Returning existing Action instance
Good luck for yourself.
Merrill
Consultant, Sima Solutions
Originally posted by Merrill Higginson:
The log4j.properties entry that I gave you will only set the logging level at "ERROR" for Struts, and will leave all other logging as it was.
Originally posted by Merrill Higginson:
Just set the Struts logger level to some high level such as ERROR. Example:
<blockquote>code:
<pre name="code" class="core">log4j.org.apache.struts=ERROR, SomeAppender</pre>
This works for us. The only thing is we added "logger" in between as follows:
log4j.logger.org.apache.struts=ERROR, SomeAppender Thanks.
Merrill
Consultant, Sima Solutions