ServiceLogger is a new lightweight trace that can be used in mainly in Production environment. This feature available in 7.0.0.4 onwards.
Add the following code to web.xml file for the Stores.war project. This is for logging of JSP execution times with ServiceLogger requires a new Servlet Filter is registered in web.xml file.
<filter>
<filter-name>JspExecutionServiceLoggingFilter</filter-name>
<filter-class>com.ibm.commerce.webcontroller.JspExecutionServiceLoggingFilter</filter-class>
<init-param>
<param-name>ServletName</param-name>
<param-value>JspExecutionServiceLoggingFilter</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>JspExecutionServiceLoggingFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
Add the following code to web.xml file for the Stores.war project. This is for logging of JSP execution times with ServiceLogger requires a new Servlet Filter is registered in web.xml file.
<filter>
<filter-name>JspExecutionServiceLoggingFilter</filter-name>
<filter-class>com.ibm.commerce.webcontroller.JspExecutionServiceLoggingFilter</filter-class>
<init-param>
<param-name>ServletName</param-name>
<param-value>JspExecutionServiceLoggingFilter</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>JspExecutionServiceLoggingFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
Enabling the Logger in the WAS Admin Console:-
com. ibm. comm erce .fou ndat ion. logg ing. Serv iceL ogge r={f ine, fine r,fi nest }
The difference with this logger is that it will write more or less depending on the logging level selected {f ine, fine r,fi nest }. This fine grained control allows to minimize the performance impact for use in production and other environments.
No comments:
Post a Comment