After downloading FacesTrace and adding it to your classpath, following steps are necessary to start using the library:
In case you're still not using Facelets(you should be) and using JSP as the markup of JSF pages, the taglib for FacesTrace is;
<%@ taglib uri="http://facestrace.sourceforge.net" prefix="ft"%>
FacesTrace facelets taglib definition is included in the FacesTrace distribution jar, Facelets should automatically pick it up so no configuration is necessary at this point. The xml namespace declaration would be;
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:ft="http://facestrace.sourceforge.net">
Although FacesTrace is great in the development process, it should be disabled in a production environment. Following init parameter turns FacesTrace off.
This step is only necessary if you're willing to use FacesTrace's Logging support. FacesTrace uses it's own log4j appender to collect the logs. In order to use this feature, the appender must be registered in the log4j configuration. An example log4j.xml looks like;
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration PUBLIC "-//LOG4J" "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="FACESTRACE"
class="com.prime.facestrace.logging.FacesTraceAppender">
</appender>
<logger name="your.app">
<level value="DEBUG" />
</logger>
<root>
<level value="INFO" />
<appender-ref ref="FACESTRACE" />
</root>
</log4j:configuration>