Overview
Riva On-Premise can store JSON diagnostic logs in a directory other than the default Riva logs directory.
When a custom directory is configured, JSON diagnostic logs continue to follow the standard log archiving and retention settings. This includes compressing older logs and deleting archived logs when the configured limits are reached.
Configure the Custom Directory
The settings must be added to the applicable application .config file. They cannot be configured on a sync policy.
-
Open the
.configfile for the Riva application or service that generates the JSON diagnostic logs.For example, for the 64-bit Riva CRM Agent service, update:
Omni.Riva.CrmAgentEx64.exe.config -
Under
<appSettings>, add the following settings:<add key="JsonOmniRollingFileAppender.Enabled" value="true" /> <add key="JsonOmniRollingFileAppender.DirectoryPathOverride" value="D:\Riva\JsonLogs" />
- Replace
D:\Riva\JsonLogswith the directory where the JSON diagnostic logs should be stored. - Ensure that the directory exists and that the account running the applicable Riva service has permission to write to it.
- Save the
.configfile. - Restart the applicable Riva service or application.
- Confirm that JSON diagnostic logs are being created in the configured directory.
Log Archiving and Retention
Changing the directory does not disable log archiving or clean-up. JSON diagnostic logs in the custom directory continue to be archived and removed according to these log-management settings:
<add key="Crm.LogManager.ArchivedLogsSizeMB" value="n" />
<add key="Crm.LogManager.ArchivedLogsRetentionWeeks" value="n" />
<add key="Crm.LogManager.MaxProcessingLogsFiles" value="n" />Replace n with the required value for each setting.
These settings must also be added to the applicable application .config file, not to a sync policy.