log_filter_internal log filter component
implements a simple form of log filtering based on error event
priority and error code. To affect how
log_filter_internal permits or suppresses
error, warning, and information events intended for the error
log, set the
log_filter_internal is built in and enabled
by default. If this filter is disabled,
no effect, so filtering must be modeled using another filter
service instead where desired (for example, with individual
filter rules when using
For information about filter configuration, see
Section 18.104.22.168, “Error Log Component Configuration”.
Events intended for the error log have a priority of
variable controls verbosity based on which priorities to
permit for messages written to the log, as shown in the
|Permitted Message Priorities||log_error_verbosity Value|
log_error_verbosity is 2
or greater, the server logs messages about statements that are
unsafe for statement-based logging. If the value is 3, the
server logs aborted connections and access-denied errors for
new connection attempts. See
Section B.4.2.10, “Communication Errors and Aborted Connections”.
If you use replication, a
log_error_verbosity value of
2 or greater is recommended, to obtain more information about
what is happening, such as messages about network failures and
log_error_verbosity is 2
or greater on a slave server, the slave prints messages to the
error log to provide information about its status, such as the
binary log and relay log coordinates where it starts its job,
when it is switching to another relay log, when it reconnects
after a disconnect, and so forth.
There is also a priority of
messages about non-error situations are printed to the error
log regardless of the
These messages include startup and shutdown messages, and some
significant changes to settings.
In the MySQL error log, system messages are labeled as “System”. Other log writers might or might not follow the same convention, and in the resulting logs, system messages might be assigned the label used for the information priority level, such as “Note” or “Information”. If you apply any additional filtering or redirection for logging based on the labeling of messages, system messages do not override your filter, but are handled by it in the same way as other messages.
system variable applies to events intended for the error log
and specifies which events to suppress when they occur with a
INFORMATION. For example, if a particular
type of warning is considered undesirable “noise”
in the error log because it occurs frequently but is not of
interest, it can be suppressed.
value may be the empty string for no suppression, or a list of
one or more comma-separated values indicating the error codes
to suppress. Error codes may be specified in symbolic or
numeric form. A numeric code may be specified with or without
MY- prefix. Leading zeros in the
numeric part are not significant. Examples of permitted code
ER_SERVER_SHUTDOWN_COMPLETE MY-000031 000031 MY-31 31
Symbolic values are preferable to numeric values for readability and portability.
Although codes to be suppressed can be expressed in symbolic or numeric form, the numeric value of each code must be in a permitted range:
1 to 999: Global error codes that are used by the server as well as by clients.
10000 and higher: Server error codes intended to be written to the error log (not sent to clients).
In addition, each error code specified must actually be used
by MySQL. Attempts to specify a code not within a permitted
range or within a permitted range but not used by MySQL
produce an error and the
value remains unchanged.
For information about error code ranges and the error symbols and numbers defined within each range, see Appendix B, Errors, Error Codes, and Common Problems.
The server can generate messages for a given error code at
differing priorities, so suppression of a message associated
with an error code listed in
depends on its priority. Suppose that the variable has a value
has these effects:
Messages for those codes are suppressed if generated with a priority of
Messages generated with a priority of
SYSTEMare not suppressed.
[mysqld] log_error_verbosity=2 # error and warning messages only log_error_suppression_list='ER_PARSER_TRACE,MY-010001,10002'
In this case,
WARNING priority and discards messages with
INFORMATION priority. Of the nondiscarded
discards messages with
WARNING priority and
any of the named error codes.
value of 2 shown in the example is also its default value,
so the effect of this variable on
INFORMATION messages is as just described
by default, without an explicit setting. You must set
log_error_verbosity to 3 if
to affect messages with
Consider a server started with this setting:
[mysqld] log_error_verbosity=1 # error messages only
In this case,
ERROR priority and discards
INFORMATION priority. Setting
would have no effect because all error codes it might suppress
are already discarded due to the