I\'m having a project using JSF2 (2.1.2), Richfaces4 (4.0.0.Final) on tomcat6 (6.0.28). In order to manage portability between Tomcat and WebSphere7 for my EARs, I have the
Two facts:
logging.properties
file in the root of the runtime classpath.logging.properties
file of the currently(!) running runtime environment (JRE) will be used.If you're running Tomcat from inside an IDE like Eclipse, then Tomcat's own logging.properties
won't be used. The one in JDK/JRE/lib
will be used where "JDK" is the JDK install folder such as jdk1.6.0_23
. If you'd like to explicitly specify the location of the logging.properties
file, then you would need to set a VM argument:
-Djava.util.logging.config.file=/path/to/tomcat/logging.properties
Regardless of the logging file used, in order to enable Mojarra logging, you need to open the logging.properties
template file in question, scroll to the bottom and edit the following line near the bottom
java.util.logging.ConsoleHandler.level = INFO
into
java.util.logging.ConsoleHandler.level = ALL
so that the global console level is set to ALL
instead of INFO
. Otherwise lower levels than INFO
just won't be logged at all.
Finally add the following two lines to the very bottom of the file
javax.faces.level = ALL
com.sun.faces.level = ALL
javax.enterprise.resource.webcontainer.jsf.level = ALL
The first turns on all JSF API logging, the second turns on all JSF impl (Mojarra) logging, and the third turns on all JSF Java EE logging.