Section "Logging"

minConsoleLogLevel

    <entry key="minConsoleLogLevel" type="System.Int32" default="2" comment="0=debug, 1=output, 2=verbose, 3=warning, 4=normal, 5=error"></entry>

"0=debug, 1=output, 2=verbose, 3=warning, 4=normal, 5=error"

Specifies the severity of log messages that are shown in the console window - if it is visible.

Possible Values:

Value Severity
0 Debug
1 Output
2 Verbose
3 Warning
4 Normal
5 Error

minFileLogLevel

    <entry key="minFileLogLevel" type="System.Int32" default="0" comment="0=debug, 1=output, 2=verbose, 3=warning, 4=normal, 5=error"></entry>

Specifies the severity of log messages that are written to the log file.

Value Severity
0 Debug
1 Output
2 Verbose
3 Warning
4 Normal
5 Error

dontLogIfMainWindowIsHidden

    <entry key="dontLogIfMainWindowIsHidden" type="System.Boolean" default="true" comment="if the kenaflow process window is hidden no log info is written to the console"></entry>

This disables the log output to the console window if it is not visible.

This happens if the Windows session of the user is non-interactive - e.g. for a service account - or if the console window was minimized.

If this setting is "TRUE" and the console window is hidden log messages will not be written to the console window for performance reasons.

logDir

    <entry key="logDir" type="System.String" default=".\log"></entry>

Specifies the directory where the logs are stored. For relative path specifications, the "ProgramDataFolder" is used as root.

logEnabled

    <entry key="logEnabled" type="System.Boolean" default="true"></entry>

Indicates whether the log is activated. If "FALSE", no log files are written to the hard drive or to the console window.

logOnlyMainProcess

    <entry key="logOnlyMainProcess" type="System.Boolean" default="true"></entry>

Specifies whether only the main process writes log files to the hard disk or also subprocesses that are started by the main process.

logMemMaxAge

    <entry key="logMemMaxAge" type="System.Int32" default="3600" comment="seconds"></entry>

Log messages that are displayed in the console remain in the memory of the kenaflow processes. Here you can specify after how many seconds these data can be discarded. Only the oldest data is deleted.

logFileMaxAge

    <entry key="logFileMaxAge" type="System.Int32" default="14" comment="days"></entry>

Specifies the number of days that the log files are to be kept.

logCleanupRunner

    <entry key="logCleanupRunner" type="System.Int32" default="120" comment="in seconds. Amount of time before cleanup runs."></entry>

Log messages are queued in memory before they are displayed in the console window (if the process is visible) and before they are written to disk (if enabled).

There is a sub process that cleans up the used memory. This setting here specifies how often the cleanup should run.

logCleanupRunner

    <entry key="logfileCleanupRunner" type="System.Int32" default="3600" comment="in seconds. Amount of time before log file cleanup runs."></entry>

Log files on disk will grow and can be large! 200MB per hour are more than possible! Here you specify how often kenaflow checks old log files on disk. It will remove old log files that are older than logFileMaxAge days.

logFCE

    <entry key="logFCE" type="System.Boolean" default="false"></entry>

This can be used to determine whether "First Chance Exceptions" should be logged. These are exceptions in the program code that occur but do not necessarily represent errors. An exception handled in the program code is no cause for concern. Therefore, the storage of this information is normally superfluous.

logOutput

    <entry key="logOutput" type="System.Boolean" default="false"></entry>

Objects in the PowerShell pipeline that reach the top execution level of kenaflow (outside workflow scripts) can be serialized to the log.

sendOutputToMainProcess

    <entry key="sendOutputToMainProcess" type="System.Boolean" default="false"></entry>

PowerShell cmdlets often return values. Normally these return values are stored in variables. But if there is no "receiver" for the data it is written to the PowerShell pipeline. kenaflow will get this data on the last level of PowerShell execution.

This setting here specifies whether this return values (objects) are shown in the log or not.

logfileLockTimeout

    <entry key="logfileLockTimeout" type="System.Int32" default="500" comment="in milliseconds"></entry>

Each process tries to write log messages to the unified log file. This is handled by a subsystem of each kenaflow process and should not take long. During write the log file is locked.

The setting here specifies how long the log-writing sub system should wait for the lock before doing other things. If is really fails the process will keep the log in memory and will retry to write it later.

logCleanupThreadLogBlocks

    <entry key="logCleanupThreadLogBlocks" type="System.Int32" default="60" comment="in seconds. Amount of time before cleanup runs."></entry>

Functional parts of the software are grouped into logical blocks. kenaflow tries to group log messages in the same way, e.g. for detailed log analysis.

Each logical block gets a number, assigned at runtime. A sub system cleanup this up. The setting here specifies the amount of time (in seconds) between two cleanup attempts.

heartbeatMessageInLog

    <entry key="heartbeatMessageInLog" type="System.Boolean" default="false"></entry>

If enabled on each heartbeat communication a message is written to the log with level 'Debug'.

garbageCollectionMessageInLog

    <entry key="garbageCollectionMessageInLog" type="System.Boolean" default="false"></entry>

If enabled on each .NET garbage collection cleanup request a message is written to the log with level 'Debug'.

disableStacktrace

    <entry key="disableStacktrace" type="System.Boolean" default="false"></entry>

If enabled the .net Stack Trace is included in exception log messages.

Full Section Default

  <section name="logging">
    <entry key="minConsoleLogLevel" type="System.Int32" default="2" comment="0=debug, 1=output, 2=verbose, 3=warning, 4=normal, 5=error"></entry>
    <entry key="minFileLogLevel" type="System.Int32" default="0" comment="0=debug, 1=output, 2=verbose, 3=warning, 4=normal, 5=error"></entry>
    <entry key="dontLogIfMainWindowIsHidden" type="System.Boolean" default="true" comment="if the kenaflow process window is hidden no log info is written to the console"></entry>
    <entry key="logDir" type="System.String" default=".\log"></entry>
    <entry key="logEnabled" type="System.Boolean" default="true"></entry>
    <entry key="logOnlyMainProcess" type="System.Boolean" default="true"></entry>
    <entry key="logMemMaxAge" type="System.Int32" default="3600" comment="seconds"></entry>
    <entry key="logFileMaxAge" type="System.Int32" default="14" comment="days"></entry>
    <entry key="logCleanupRunner" type="System.Int32" default="120" comment="in seconds. Amount of time before cleanup runs.">60</entry>
    <entry key="logfileCleanupRunner" type="System.Int32" default="3600" comment="in seconds. Amount of time before log file cleanup runs.">60</entry>
    <entry key="logFCE" type="System.Boolean" default="false"></entry>
    <entry key="logOutput" type="System.Boolean" default="false"></entry>
    <entry key="sendOutputToMainProcess" type="System.Boolean" default="false"></entry>
    <entry key="logfileLockTimeout" type="System.Int32" default="500" comment="in milliseconds"></entry>
    <entry key="logCleanupThreadLogBlocks" type="System.Int32" default="60" comment="in seconds. Amount of time before cleanup runs."></entry>
    <entry key="heartbeatMessageInLog" type="System.Boolean" default="false"></entry>
    <entry key="garbageCollectionMessageInLog" type="System.Boolean" default="false"></entry>
    <entry key="disableStacktrace" type="System.Boolean" default="false"></entry>
  </section>

Discussion