-
1. Re: Log4j and JBOSS 7.x
wdfink Jan 12, 2012 9:54 AM (in response to newway)No, AS7 is different.
1)
Have a look into the standalone.xml or domain.xml depend on what you use.
See the subsystem 'logging' here you will find the settings.
2)
This is very simple
try localhost:9990 in your browser
Klick on Profile (right upper corner) and select 'core' loggers' from the tree on the left.
Here you are able to change the logging configuration on-the-fly and the changes are persistent in AS7
-
2. Re: Log4j and JBOSS 7.x
dastraub Jan 13, 2012 6:26 AM (in response to wdfink)Where can I find more details about the used pattern layout etc ? I guess (and tried) is it similar to log4j pattern layout.
But what is the layout to show a exception in the jboss-as code ?
For e.g. I try to find some errors during a web app login. In the "SecurityContextAssociationValve" is a statement like this :
log.debugf("Failed to determine servlet", e);
(in my case it was a NullpointerException), but the exception stacktrace is not shown
Here my logger configuration in standalone.xml
<console-handler name="DEBUG-CONSOLE">
<level name="TRACE"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%C.%M:%L] (%t) %s%E%n"/>
</formatter>
</console-handler>
...
<logger category="org.jboss.web" use-parent-handlers="false">
<level name="TRACE"/>
<handlers>
<handler name="DEBUG-CONSOLE"/>
</handlers>
</logger>
<logger category="org.jboss.as.web" use-parent-handlers="false">
<level name="TRACE"/>
<handlers>
<handler name="DEBUG-CONSOLE"/>
</handlers>
</logger>
Any ideas how to configure the logger ?
-
3. Re: Log4j and JBOSS 7.x
wdfink Jan 13, 2012 7:29 AM (in response to dastraub)Not nice
For the pattern you might see the apache log4j documentation (API doc PatternLayout).
But I suppose it will not help.
You might add a category org.jboss.as.web with DEBUG to see more details.
Otherwise it might only help to change the statement to log.debugf(e,"Failed to determine servlet"). In that case the Exception is logged with the complete stacktrace.