Welcome Guest! Log in


Stambia DI Runtimes stores its executed sessions logs into a Log Database, which can be configured to use your own custom database.

This article explains how to configure Runtime to write session logs to asynchronous mode.

 

Logging Mode

By default, when a session is executed, all the session logs are logged synchronously on the log database.

Which means that the session which is being executed is waiting for the logs to be successfully logged before continuing.

For example, an action starts to be executed, the information about that are logged, then when they are logged, the execution continue to the next action, etc...

This allows to always have up to date information in log database and to follow the executions directly.

But this can cause performance issues because the logging can take time.

There is an attribute to allow the logging of session logs to be asynchronous, which means that the logs will be logged asynchronously and the session will run without waiting for the logs to complete.

This new attribute is named “synchMode“, it accepts three values: “synch”, “asynch”, “synchFirstLog”.

  • synch: session logs are synchronous, while being executing, a session will log synchronously all its session logs. This is the default mode used.
  • asynch: while being executing, a session will log asynchronously all its session logs, the session will continue to be executed without waiting for the information to be logged in database.
  • synchFirstLog:this mode is therefore a mix between the synch and asynch mode. The first log of the session will be synchronous, to be sure that at least one log has worked and that the log database is available, then the following logs will all be asynchronous.

Default value when the attribute is not defined is “synch”.

 

Runtime Configuration

Runtime can be configured to write session logs to different RDBMS databases.

The main entry point to configure the various parameters of the Runtime is Runtime's Configuration file.

For more information configure the Runtime for writing to a RDBMS log database, refere to this article.

 

For instance, here is an example for defining the Log Database inside a MySQL database.

To define the logging mode, add the attribute synchMode on the loguserLogName line.

     <!--    
        ==============================
        MySQL Log Database
        ==============================
        -->
        <logs>
            <log userLogName="logDatabase" autoUpdate="true" userLogClass="com.indy.engine.userLog.RdbmsUserLog" synchMod="asynch" >
                <parameter name="userLogRdbmsDriver" value="com.mysql.jdbc.Driver"/>
               ....
            </log>
        </logs>

 

 

 

 

 

 

 

 

 

 

 

You have no rights to post comments

Articles

Suggest a new Article!