Error Log for MariaDB Community Server 10.4
This page is part of MariaDB's Documentation.
The parent of this page is: Logging for MariaDB Community Server 10.4
Topics on this page:
Overview
MariaDB Community Server 10.4 writes log messages to its error log.
Reference material is available for MariaDB Community Server 10.4.
Purpose
The error log is intended for:
Monitoring the ES system status
Diagnosing problems with queries
Diagnosing communication problems between Galera Cluster nodes
Diagnosing connection failures
Format
The error log uses the following log format:
timestamp thread id [logging level] message
The fields in each log message are:
Field | Description |
---|---|
| The timestamp for the log message in the format |
| The thread ID |
| The log level for the log message |
| The log message. |
Log Levels
The error log uses the following log levels in the logging level
field:
Error
Note
Warning
Location
By default, the error log is located in the data directory defined by the datadir system variable, and the error log's file name is HOSTNAME.err
, where HOSTNAME
is the system's host name.
You can determine the error log's file name and location by querying the log_
SHOW GLOBAL VARIABLES
LIKE 'log_error';
Configuration
Several aspects of the error log are configurable.
Configure the Path
The path to the error log is configured by setting the log_
The system variable can be set in a configuration file:
[mariadb]
log_error=mariadbd.err
The error log will be created in the data directory defined by the datadir system variable.
The error log can be placed outside of the data directory by setting the log_
[mariadb]
log_error=/var/log/mariadb/mariadbd.err
If the log_HOSTNAME.err
, where HOSTNAME
is the system's host name:
[mariadb]
# base name on the system's host name
log_error
Configure the Verbosity Level
The verbosity of the error log is configured by the log_
The verbosity can be between 0 and 9.
The system variable can be set in a configuration file:
[mariadb]
log_warnings=3