Membrane can log the access to APIs to a CSV file. The fields will be separated by semicolon ;, so that you can import the data into Excel.
To run the example execute the following steps:
-
Go to the
examples/logging/consoledirectory. -
Run
membrane.shormembrane.cmd -
Route a request through Membrane:
curl localhost:2000 -
Open the newly created
log.csvfile and take a look at the logged data.Status Code;Time;Rule;Method;Path;Client;Server;Request Content-Type;Request Content Length;Response Content-Type;Response Content Length;Duration; 200;2022-12-21 11:00:34.882;:2000;GET;/;localhost;api.predic8.de;;unknown;application/json;336;32; -
Hava a look at the
proxies.xmlfile:
<serviceProxy port="2000">
<log headerOnly="false"/>
<target host="api.predic8.de">
<ssl/>
</target>
</serviceProxy>
See:
- log reference