|
AxisLogger
Configuring the Logger for Apache Axis
IntroductionThe Logger is an Axis client side handler, that can be configured to capture each request and response into files, organized by the date and other properties. It can also be managed via JMX if required - to have the ability to dynamically turn logging on or off. All log files will reside under the rootPath organized by subdirectories, that group by date. Optionally an identifier maybe used to group files within the date. Each request and response is then captured using the SOAP operation name, and time followed by a unique sequence number. i.e. Log requests to rootPath/date/identifier/operation HH MM SS seqreq.xml e.g. ConfigurationTo engage the Logging handler, edit your client-config.wsdd or create a custom configuration with the Logging handler enabled (see example Client), as follows: ...
<globalConfiguration>
<requestFlow>
<handler type="java:org.adroitlogic.axis.logger.Logger">
<parameter name="rootPath" value="/var/logs"/>
<parameter name="enableJMX" value="true"/>
<parameter name="enabled" value="true"/>
</handler>
</requestFlow>
<responseFlow>
<handler type="java:org.adroitlogic.axis.logger.Logger"/>
</responseFlow>
</globalConfiguration>
...To log both the request and response, you must include the Logger handler in the requestFlow and the responseFlow. However, you only need to "configure" the options in the requestFlow, as response messages are logged correspondingly to the request message for the operation. rootPath - defines the root path where all log files will reside dateFormat - specify a valid Java dateformat that will yield a valid path (default is yyyy_MM_dd) identifier - an optional grouping identifier string that will group files within the date. When multiple handler instances are used within the same JVM, this is also used to uniquely identify the different JMX beans enableJMX - allow a JMX console to connect and manage the logger enable - if disabled, but JMX is enabled, will allow the Logger to be enabled at runtime via JMX Donations
to help further development of the utilities. Donate |
Sign in to add a comment