Skip to main content
Version: 7.2405.x.x LTS

Audit module configuration

The following parameters in the nevisidm-prod.properties file control the audit module:

  • application.modules.auditing.enabled (boolean, "true"): Enables or disables the audit module.
  • application.modules.auditing.provider: Defines the implementing bean name, which can either be jsonAuditProvider or jcanLogAuditProvider.
  • application.modules.auditing.file (string, -): Configures the location of the audit file. This parameter is mandatory for the jsonAuditProvider if you want to write the audit entries into files.
  • application.modules.auditing.console (boolean, "false"): Enables the logging of audit entries to the console. It writes the audit.log prefix to each entry and ignores rolling configurations. This parameter is supported only by the JSON audit provider (application.modules.auditing.provider=jsonAuditProvider). For other audit providers, you can use the logging.yml file.

If you do not set either the parameter application.modules.auditing.file or the parameter application.modules.auditing.console for the jsonAuditProvider, auditing will be disabled.

jsonAuditProvider rollover configurations

The following configurations are only supported by the jsonAuditProvider audit provider. You use them to define the rollover settings.

  • application.modules.auditing.rolling.daily (boolean, "true"): Enables a daily rollover of the audit file.

  • application.modules.auditing.rolling.file.size (string, -): Enables a rollover once the file has reached the specified size. You can specify the size in bytes, with the suffixes KB, MB or GB. For example: 20MB.

    If you do not set this property, and the daily rollover is not enabled either, then there is no rollover or archiving of the audit file. The log file will grow indefinitely, until physical limits are reached.

  • application.modules.auditing.rolling.file.max.backup.count (integer, "0"): Defines the maximum number of archived log files to keep. For example, if you set the property to "3", three archived log files are kept, besides the active log file.

The following table helps to understand how the various rollover configurations interact:

Note that there is an OR relation between the application.modules.auditing.rolling.daily and application.modules.auditing.rolling.file.size properties. That is, as soon as one of the properties is set and applies, a rollover of the audit file will take place.

application.modules.
auditing.rolling.daily
application.modules.
auditing.rolling.
file.size
application.modules.
auditing.rolling.file.
max.backup.count
application.modules.
auditing.file
archived.files
true-2/var/opt/nevisidm/<instance_name>/log/audit.logaudit.log-2019-11-28audit.log-2019-11-29
false100MB2/var/opt/nevisidm/<instance_name>/log/audit.logaudit.log-1 (>100MB) audit.log-2 (>100MB)
true100MB3/var/opt/nevisidm/<instance_name>/log/audit.logaudit.log-2019-11-29-2audit.log-2019-11-29-1 (>100MB) audit.log-2019-11-28
false-3/var/opt/nevisidm/<instance_name>/log/audit.logNo rollover and no archiving of log files.
true100MB0/var/opt/nevisidm/<instance_name>/log/audit.logaudit.log-2019-11-29-2 (>100MB) audit.log-2019-11-29-1 (>100MB) audit.log-2019-11-28-3 (>100MB) audit.log-2019-11-28-2 (>100MB) audit.log-2019-11-28-1 (>100MB)... (no automatic log file removal)