Problem
Administrators often configure advanced logging by doing the following:
-
Go to System Console → Environment → Logging
-
Paste the sample
AdvancedLoggingJSON
configuration from the Mattermost documentation -
Click Save
-
Manually create the specified audit log file (e.g.,
./logs/audit.log
) with correct ownership and permissions
Despite this, no audit data is written to the file.
Root Cause
The issue occurs because the System Console UI does not expose all required settings needed to enable audit logging to a file.
While AdvancedLoggingJSON
defines the logging target and levels, Mattermost still requires separate activation of audit logging through the ExperimentalAuditSettings
block in the config.json
file.
These settings are not set automatically when using the System Console and are not included in the official documentation example.
Required Fix
Step 1: Manually Enable Audit Logging to File
You must manually set the following in config.json
:
-
FileEnabled: true
tells Mattermost to write audit logs to a file. -
Filename
must exactly match the path used in your advanced logging configuration.
Comments
Please sign in to leave a comment.