Overview
|
Here's a little Handler I made that routes java.util.logging messsages to Log4J. These are all available here:
This very nicely solves the Facelets 'loadImplicit' error issue as well as giving you the flexibility to enable more detailed logging for the JSF reference implementation.
The java.util.logging Handler Class
JuliToLog4jHandler.java
JMX MBean Wrapper
Lifecycle.java
JuliToLog4jServiceMBean.java
JuliToLog4jService.java
Adding it to JBoss AS
Once you have the classes in the classpath, just add the following to conf/jboss-service.xml right after the Log4JService declaration:
NOTE: This is not needed in JBoss 5.x, it already has this feature.
See Also
Labels
4 Comments
Hide/Show CommentsJul 12, 2011
Anonymous
indeed logging is very important but at the same time using correct logging level is more important otherwise excessive logging will reduce the application performance by the way here is my favorite java logging tips you may find interesting
Jul 12, 2011
Joshua Davis
That link doesn't work because it has a trailing double quote. Here is the correct link:
http://javarevisited.blogspot.com/2011/05/top-10-tips-on-logging-in-java.html
Aug 08, 2011
Anonymous
I created the following code to transfer all the log4j loger configuration to JUL logger configurations. This should speed things up a bit since there are no unnecesary log messages created in JUL which are then dropped in Log4J:
Aug 09, 2011
Joshua Davis
Neat. Yeah, that would make things more streamlined.