+49 228 5552576-0


info@predic8.com

Logging Service Invocation Metadata to a CSV File

Using the StatisticsCSVInterceptor, Membrane Monitor and Router can log data about service calls into a file. The fields will be separated by semicolon (;), so that you can import the data into Excel.
Each entry in the log file will contain:

Configuration

Interceptors can be defined in the monitor-beans.xml or in the proxies.xml file. When you define them in the monitor-beans.xml they can be registered with the transport or referenced from the proxies.xml file. Interceptors that are registerd with the transport are called for every request, while interceptors that are referenced or defined by a serviceProxy or proxy element only apply to requests that target that proxy.

Per proxy logging is configured in a proxy.xml file. Add a statisticsCSV element to a proxy or serviceProxy.

<membrane>
	<serviceProxy name="predic8.com" port="2000">
		<statisticsCSV file="log.csv" />
		<target host="membrane-soa.org" port="80" />
	</serviceProxy>
</membrane>

Take also a look at the example located in the examples/logging-csv directory of your membrane distribution.

Global logging is configured in a monitor-beans.xml file. Add a statisticsCSV element to the transport.

<transport>
	<interceptors>
		<ruleMatching />
		<dispatching />
		
		<statisticsCSV fileName="log.csv" />
		
	</interceptors>
</transport>
Adjust the fileName property, restart the application, and you're all set.

Copyright © 2008-2015 predic8 GmbH
Moltkestr. 40, 53173 Bonn, Tel. +49 (228) 555 25 76-0