Audit Logs Not Written to File After Configuring Advanced Logging via System Console

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:

 
 
"ExperimentalAuditSettings": {

"FileEnabled": true,
"Filename": "./logs/audit.log" }
  • FileEnabled: true tells Mattermost to write audit logs to a file.

  • Filename must exactly match the path used in your advanced logging configuration.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.