Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 37.6Mb
PDF (A4) - 37.5Mb
PDF (RPM) - 33.3Mb
HTML Download (TGZ) - 8.3Mb
HTML Download (Zip) - 8.3Mb
HTML Download (RPM) - 7.2Mb
Man Pages (TGZ) - 129.9Kb
Man Pages (Zip) - 185.5Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb

MySQL 8.0 Reference Manual  /  ...  /  Error Log Message Format

Pre-General Availability Draft: 2018-03-21 Error Log Message Format

Each error log sink (writer) component has a characteristic output format it uses to write messages to its destination, but other factors may influence the content of the messages:

  • The information available to the log writer. If a log filter component executed prior to execution of the writer component removes a log event attribute, that attribute is not available for writing.

  • System variables may affect log writers.

For all log writers, the ID included in error log messages is that of the thread within mysqld responsible for writing the message. This indicates which part of the server produced the message, and is consistent with general query log and slow query log messages, which include the connection thread ID.

Output Format for log_sink_internal

This log writer produces the traditional error log output. It writes messages using this format:

timestamp thread_id [severity] [error_id] message


2017-12-14T17:42:53.746748Z 0 [Warning] [MY-010068] CA certificate /var/mysql/sslinfo/cacert.pem is self signed.
2017-12-15T03:20:32.285324Z 0 [Note] [MY-010253] IPv6 is available.

Prior to MySQL 8.0.4, the error ID field is not present. Log parsers can treat the error ID field as a part of the message text that will be present only for logs written by MySQL 8.0.4 and higher. Parsers must treat the error_id part of [error_id] indicators as a string value.

Output Format for log_sink_json

The JSON-format log writer produces messages as JSON objects that contain key/value pairs. For example:

{ "prio" : 2, "err_code" : 3674, "subsystem" : "event",
"source_line" : 585, "source_file" : "", "function" : "run",
"msg" : "Event Scheduler: scheduler thread started with id 4",
"time" : "2017-08-31T18:33:25.483190Z", "thread" : 4,
"err_symbol" : "ER_SCHEDULER_STARTED", "SQL_state" : "HY000",
"label" : "Note" }
Output Format for log_sink_syseventlog

The system log writer produces output that conforms to the system log format used on the local platform.

System Variables That Affect Error Log Format

The log_timestamps system variable controls the time zone of timestamps in messages written to the error log (as well as to general query log and slow query log files). Permitted values are UTC (the default) and SYSTEM (local system time zone).

User Comments
Sign Up Login You must be logged in to post a comment.