- 31 May 2024
- 4 Minutes to read
- Print
- DarkLight
Logging Settings
- Updated on 31 May 2024
- 4 Minutes to read
- Print
- DarkLight
Additionally, Settings.xml should be backed up before making any changes to the Logging Settings.
Overview
Administrators are provided options that allow the configuration of various logging parameters such as Log File Size, API Call Timeouts, and Database Timeouts that are recorded in the Decisions Logs.
These settings affect Logs recorded in the Logging Tool (System > Administration > System Tools). The following article covers the respective function and configuration of each Logging Setting.
In v7.6 and below to access the Logging Settings and Server Log Categories go to System > Administration > System Tools and right click Logging.
Available Logging Settings
The following table lists the name of each logging setting, its default value, and a description of what it controls.
Setting Name | Default Value | Description |
---|---|---|
LogAPICallsTaking MoreThanSeconds | 5 | Records logs for API calls that take longer than the specified time in seconds. By default any API call that takes longer than five seconds will be recorded in a log. |
LogCheckFieldTypes | False | When set to True, verifies the types of fields used in WHERE clauses. Logs under CheckTypesLogger category at Debug, Warn, and Error if it finds mismatch levels. |
LogDebug/LogInfo | False | When set to True, records event types of this level in the log. Since these levels of event types occur frequently, users may experience performance and/or log size issues as the system continuously records them. |
LogError/LogFatal/ LogWarn | True | Record these event types in the log by default as their True value. Setting this to False stops recording these events in the log. It is recommended to keep these as True to aid any future troubleshooting. Errors and Fatal Errors are also logged as Windows Events for monitoring by external tools. |
LogFileMaxSize | 10,485,760 | Prompts for the max file size (bytes) of a log. When this is exceeded a new log file is created. The default 10,485,760 bytes equates to a maximum limit of about 10.49 MB. The maximum configurable limit is maxInt32, 2,147,483,647 bytes, aka 2.14 GB. |
LogFlowStepsTaking MoreThanMilliseconds | 1000 | Prompts for a time threshold (milliseconds) that if a Flow step exceeds will then be recorded in the log. The default 1,000 value equals one second, so any steps taking longer than this will be in the log. |
LogMaxBackups | 10 | Prompts for the maximum amount of backups a Log file can create of itself. For example, the Decisions Logs folder may contain some log files with the same name but a number after the name. These numbered logs are backups made before a new log is created. |
LogsDirectory | C:\Users\[Name]\Downloads\Logs | Prompts for the file path Installer Logs will reside. This is usually located at the same place as the Installer. This cannot be changed. |
LogSqlStatementsTaking MoreThanSeconds | 5 | The time an SQL statement can take before it is recorded in a log. |
CaptureAspNetLogs | False | Enables Kestrel Access Logging and generates Asp.net core Logs (file typically contains "Microsoft.AspNetCore" in the Logs/webserverlogs. |
CaptureW3CLogs | False | Enables Kestrel Access Logging and generates W3C Logs in the Logs/webserverlogs folder. If the setting is not present in Settings.xml, the following may be added to enable it: <CaptureW3CLogs>true</CaptureW3CLogs> |
AspNetLogsFileCountLimit | 30 | The number of files retained for AspNet Log; is used by both CaptureW3CLogs and CaptureAspNetLogs. |
AspNetLogsFileSizeLimit | 104857600 | The max size (bytes) of each individual AspNetLog file; is used by both CaptureW3Logs as well as CaptureAspNetLogs. |
Accessing and Editing Settings
Logging Settings can be accessed through one of the following methods:
- via the Decisions Installer (DecisionsServerInstaller.exe)
- via the Settings.xml file
- via the System Settings in the Decisions Studio
Though many Settings can be accessed throughout each method, some Settings, such as "LogSQLStatementsTakingMoreThanSeconds", require additional configuration or adjustment via Settings.xml or DecisionsServerInstaller.exe.
Installer
- From DecisionsServerInstaller.exe, click EDIT SETTINGS.
- Navigate to Settings containing the word "Log". Adjust the Settings as desired in the column to the right of the Setting's name.
Once Settings have been established as desired, click Save. - After the Settings have been applied, click RESTART SERVICE.
Settings.XML
- From C:\Program Files\Decisions\Decisions Server, open Settings.xml in a text editor (ex: Notepad).
- Change the value(s) between the respective Logging open/close tags.
For example, <LogMaxBackups>10</LogMaxBackups> may be changed to <LogMaxBackups>15</LogMaxBackups>. - Save and close the text editor.
- Restart Decisions.
System Settings
- From the Studio, navigate to the Settings Folder.
- Open Logging Settings.
- Select the desired Setting from the Logging Settings list, in this case, File System.
- Click on the File System Logging Setting to view the available settings such as Levels, Log Categories, and Advanced containing Max File Size and Backup Limit settings.
- When adding a new Log Category, checking the Log To Own File creates a custom Log File for that specific Category.
LogSettings.json
The LogSettings.json file can be found in the C:\Program Files\Decisions\Decisions Server folder in the File System. This file is used to control the behavior of Logging events at the Local level within the File System. Log Category Settings like Category Name or Level can be adjusted in this file.
Enabling Web Server Logs in Self Hosted Environments
- From the Local File System, navigate to C:\\Program Files\Decisions\Decisions Server.
- As an Administrator, Open Settings.XML in the desired text editor.
- Change the <CaptureAspNetLogs>...</CaptureAspNetLogs> value from false to true.
- Save and close Settings.xml.
- Restart Decisions via the RESTART SERVICES button in DecisionsInstaller.exe.
Encrypting Session IDs for Logs
For versions 7.14 and above, Session IDs found in log files can be encrypted within a log file. This is done through the ObfuscateSessionIDInLogs property in the Settings.xml. However, this property will need to be manually added for versions upgrading to 7.14+.
- To add the property, run the Decisions Installer.
- Once the Installer has opened, select Edit Settings
- Locate the ObfuscateSessionIDInLogs property and set the value to True.
- Save and Restart Decisions.
Once the environment has been restarted, the property will appear in the Settings.xml file. Once enabled, any logs which contain a Session ID will be encrypted.