Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


This article shows how to control the level of details that the Runtime will write into the log database, for each session.

Different log levels

Here are the different log level values with the corresponding logged information based on session status.

logLevel Running session Successful session Session with errors
-1 Not logged Not logged Not logged
0 Full details Not logged Full details
100 Full details Session Header and Statistics Full details
200 Full details [logLevel 100] + Process Information and Statistics Full details
300 Full details [logLevel 200] + Actions Information and Statistics Full details
400 Full details Full details Full details

Example: at level 100, you can consult all details while the session is running. If it ends with errors, you can consult all session details. If it ends successfully, only the session's header and stats will be kept.

The level 100 is a great way to reduce the log database volume and keep track of execution times.

 

Customizing log level

The default log level to be used when a session is executed can be customized in the Runtime's configuration file.

The value specified will be used as default for all sessions executed by the Runtime.

This default log level can then be overridden per session at development or execution times if needed as explained below.

 

Specifying default log level

Default log level used when a session is executed is the maximum log level (400).

This default value can be customized in Runtime's Configuration file through a dedicated parameter.

This default value will be used for all executed session on which the log level has not been manually overridden.

Open engineParameters.xml file and change the following parameter:

<parameters>
<...>
<engineParameters>
<...>
<parameter name="defaultSessionLogLevel" value="400"/>
<...>
</engineParameters>
<...>
</parameters>

 

Changing default session logging level requires a Runtime S17.6.5 or higher.

On previous version it was fixed to 400.

 

Specifying the log level when developing the process

A Stambia Process can be configured to use a defined log level when being executed.

This log level will be effective on every session that has this process as a main process.

This is performed through adding the following nodes in Meta-Inf tab of Process's Properties:

<logLevel>400</logLevel>

 

Example:

78 01

 

Specifying the log level when executing through command line

When executing through the command line scripts, log level can be defined as follow:

startdelivery.bat -name updateCustomers -logLevel 200

 

Specifying the log level when executing through a web service

When invoking a web service exposed by Stambia, you can specify the log level to be used for the session that will be created.

For SOAP Invocations

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:stan="http://stambia.com/xsd/standard">
<soapenv:Header/>
<soapenv:Body>
<stan:stambiaInput synchronous="true" sessionId="?" parentSessionId="?" logLevel="-1" sessionName="?"/>
</soapenv:Body>
</soapenv:Envelope>

 

For REST Invocations

Add following HTTP Header with the log level value to be used for the session that will be created:

X-loglevel

 

 

Articles

Suggest a new Article!