Implémentation de la journalisation personnalisée
Pour implémenter la consignation personnalisée, insérez un bean CustomLog dans votre page JSP.
Pourquoi et quand exécuter cette tâche
Le code suivant fournit un exemple :
<jsp:useBean class="com.ibm.wcp.analysis.beans.CustomLog" id="custom" scope="session" />
<% custom.log( request, "version", "1.0" ); %>Vous pouvez également consigner plusieurs valeurs. Par exemple:
<jsp:useBean class="com.ibm.wcp.analysis.beans.CustomLog" id="custom" scope="session" />
<%
Hashtable customInfo = new Hashtable();
customInfo.put( "version", "1.0" );
customInfo.put( "custLevel", new String[] { "gold", "preferred" } );
customInfo.put( "custRegion", "West" );
custom.log( request, customInfo );
%>