Logging from the Perfion API
From version 4.6.0 it is possible to log all Perfion queries and ECommerce-methods processed by the Perfion API. Note that this does not affect the JSON API.
Logging is enabled by adding the following key to appSettings-Element in web.config:
<add key="Perfion.LogPath" value="C:\Temp\PerfionQueryLog" />
Log-files will be created in a folder-structure beneath the supplied path. There will be two immediate sub-folders: One for Perfion Queries and one for ECommerce API-methods:
Each of those two folders will contain a folder for each date the log has run and stored at least one log file.
In each date-folder the log files logged that date are store. Log files are named so that start time (in UTC time), duration and any exception can be seen without opening the file as can be seen here:
Log files representing not yet completed queries/methods will just have the word “Working” assigned to it:
When looking like this they only contain the Perfion Query/ECommerce-method
As soon as the query/method complete, the log files are renamed to its final name and their content is update to also contain the result or any exception happened during the call. In addition the duration of running the query is supplied in the end. An example can be seen here:
--- Start (12:07:14.438) -------------------------------------------------------
--- Query ----------------------------------------------------------------------
<Query>
<Select languages='EN'>
<Feature id='ShortText' />
</Select>
<From id ='Product'/>
<Where>
<Clause id='Cylinders' operator='=' value='6' />
</Where>
</Query>
--- Result ---------------------------------------------------------------------
<Data totalExecutionTime="00:00:00.2662278">
<!-- Result left out for brevity -->
</Data>
--- End (12:07:15.505 - Duration: 00:00:01.066) --------------------------------
NOTE: Log-files are never deleted again, so using logging permanently requires a periodical cleanup of the folder.