---
title: "Mattermost logging"
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
| Logging Type & Capture | Production Recommendation | Configuration Priority |
|---|---|---|
Log Settings All general Mattermost server operations, errors, startup/initialization, API calls, and system events. From v11.0, also includes notification subsystem events. |
Always enabled. Console: INFO, File: INFO | High - Essential for operations |
Audit Log Settings Security and compliance events, user actions, API access, authentication events, and administrative changes. |
Enable if compliance is required | Medium - Based on regulatory needs |
Notification Log Settings (applicable to v10.12 and earlier releases only) Notification subsystem events, push notifications, email delivery, mobile notification processing. |
Enable for notification troubleshooting | Low - Enable when debugging issues |
| Key | Type | Description |
| disable_timestamp | bool | Disables output of the timestamp. Default is false. |
| disable_level | bool | Disables output of the level name. Default is false. |
| disable_msg | bool | Disables output of the message text. Default is false. |
| disable_fields | bool | Disables output of all fields. Default is false. |
| disables_stacktrace | bool | Disables output of stack traces. Default is false. |
| enable_caller | string | Enables output of the file and line number that emitted a log record. Default is false. |
| delim | string | Delimiter placed between fields. Default is single space. |
| min_level_len | number | Minimum level name length. When level names are less than the minimum, level names are padded with spaces. Default is 0. |
| min_msg_len | number | Minimum message length. When message text is less than the minimum, message text is padded with spaces. Default is 0. |
| timestamp_format | string | Format for timestamps. Default is RFC3339. |
| line_end | string | Alternative end of line character(s). Default is n. |
| enable_color | bool | Enables color for targets that support color output. Default is false. |
| Key | Type | Description |
| disable_timestamp | bool | Disables output of the timestamp. Default is false. |
| disable_level | bool | Disables output of the log level display name. Default is false. |
| disable_msg | bool | Disables output of the message text. Default is false. |
| disable_fields | bool | Disables output of all fields. Default is false. |
| disables_stacktrace | bool | Disables output of stack traces. Default is false. |
| enable_caller | string | Enables output of the file and line number that emitted a log record. Default is false. |
| timestamp_format | string | Format for timestamps. Default is RFC3339. |
| Key | Type | Description |
| hostname | string | Outputs a custom hostname in log records. If omitted, hostname is taken from the operating system. |
| enable_caller | string | Enables output of the file and line number that emitted a log record. Default is false. |
| Key | Type | Description |
| id | number | Unique identifier of the log level. |
| name | string | Name of the log level. |
| stacktrace | bool | Outputs a stack trace. Default is false. |
| color | number | The ANSI color code used to output parts of the log record. Supported values include:
|
| ID | Name | Description |
| 100 | audit-api |
API events |
| 101 | audit-content |
Content changes. This log level can generate considerably more records than the other audit log levels. |
| 102 | audit-permissions |
Permission changes |
| 103 | audit-cli |
CLI operations |
| ID | Name | Description |
| 140 | LDAPError |
AD/LDAP authentication errors |
| 141 | LDAPWarn |
AD/LDAP authentication warnings |
| 142 | LDAPInfo |
AD/LDAP authentication information logs |
| 143 | LDAPDebug |
AD/LDAP authentication debug logs |
| 144 | LDAPTrace |
AD/LDAP authentication trace logs. Replaces LdapSetings.trace from Mattermost v9.3. |
| Key | Type | Description |
| filename | string | Full path to the output file. From v11.4, should be within the directory specified by MM_LOG_PATH. |
| max_size | number | Maximum size, in megabytes (MB), the log file can grow before it gets rotated. Default is 100 MB. |
| max_age | number | Maximum number of days to retain old log files based on the timestamp encoded in the filename. Default is 0 which disables the removal of old log files. |
| max_backups | number | Maximum number of old log files to retain. Default is 0 which retains all old log files. Note: Configuring max_age can result in old log files being deleted regardless of this configuration value. |
| compress | bool | Compress rotated log files using gzip. Default is false. |
| Key | Type | Description |
| host | string | IP or domain name of the server receiving the log records. |
| port | number | Port number for the server receiving the log records. |
| tls | bool | Create a TLS connection to the server receiving the log records. Default is false. |
| cert | string | Path to a cert file (.pem) to be used when establishing a TLS connection to the server. |
| insecure | bool | Mattermost accepts any certificate presented by the server, and any host name in that certificate. Default is false. Note: Should only be used in testing environments, and shouldn’t be used in production environments. |
| tag | string | Syslog tag field. |
| Key | Type | Description |
| host | string | IP or domain name of the server receiving the log records. |
| port | number | Port number for the server receiving the log records. |
| tls | bool | Create a TLS connection to the server receiving the log records. Default is false. |
| cert | string | Path to a cert file (.pem) to be used when establishing a TLS connection to the server. |
| insecure | bool | Mattermost accepts any certificate presented by the server, and any host name in that certificate. Default is false. Note: Should only be used in testing environments, and shouldn’t be used in production environments. |