It is possible to have mysqld write the error
log to the system log (the Event Log on Windows, and
syslog on Unix and Unix-like systems).
This section describes how to configure error logging using the
log_filter_internal, and the
system log writer,
take effect immediately and for subsequent server startups. For
general information about configuring error logging, see
Section 188.8.131.52, “Error Log Component Configuration”.
To enable the system log writer, first load the writer
component, then modify the
INSTALL COMPONENT 'file://component_log_sink_syseventlog'; SET GLOBAL log_error_services = 'log_filter_internal; log_sink_syseventlog';
take effect at server startup, use the instructions at
Section 184.108.40.206, “Error Log Component Configuration”. Those
instructions apply to other error-logging system variables as
For MySQL 8.0 configuration, you must enable error logging to the system log explicitly. This differs from MySQL 5.7 and earlier, for which error logging to the system log is enabled by default on Windows, and on all platforms requires no component loading.
Error logging to the system log may require additional system configuration. Consult the system log documentation for your platform.
On Windows, error messages written to the Event Log within the Application log have these characteristics:
Entries marked as
Noteare written to the Event Log, but not messages such as information statements from individual storage engines.
Event Log entries have a source of
syseventlog.tagis defined as
On Unix and Unix-like systems, logging to the system log uses
syslog. The following system variables affect
syseventlog.facility: The default facility for
daemon. Set this variable to specify a different facility.
syseventlog.include_pid: Whether to include the server process ID in each line of
syseventlog.tag: This variable defines a tag to add to the server identifier (
syslogmessages. If defined, the tag is appended to the identifier with a leading hyphen.
MySQL uses the custom label “System” for important
system messages about non-error situations, such as startup,
shutdown, and some significant changes to settings. In logs that
do not support custom labels, including the Event Log on
syslog on Unix and Unix-like
systems, system messages are assigned the label used for the
information priority level. However, these messages are printed
to the log even if the MySQL
normally excludes messages at the information level.
When a log writer must fall back to a label of
“Information” instead of “System” in
this way, and the log event is further processed outside of the
MySQL server (for example, filtered or forwarded by a
syslog configuration), these events may by
default be processed by the secondary application as being of
“Information” priority rather than