content_image/785618.jpg
•System variables control which log components to enable and how each component operates. 

The log_error_services  system variable controls which log components to enable for error logging. The variable may contain a list with 0, 1, or many elements. In the latter case, elements may be delimited by semicolon or (as of MySQL 8.0.12) comma, optionally followed by space. A given setting cannot use both semicolon and comma separators. Component order is significant because the server executes components in the order listed. 

By default, log_error_services  has this value: 

mysql> SELECT @@GLOBAL.log_error_services; +----------------------------------------+ | @@GLOBAL.log_error_services | +----------------------------------------+ | log_filter_internal; log_sink_internal | +----------------------------------------+ 

That value indicates that log events first pass through the log_filter_internal  filter component, then through the log_sink_internal  sink component, both of which are built in. A filter modifies log events seen by components named later in the log_error_services  value. A sink is a destination for log events. Typically, a sink processes log events into log messages that have a particular format and writes these messages to its associated output, such as a file or the system log. 

<img src='content_image/785618.jpg'>

## Note 

The final component in the log_error_services  value cannot be a filter. This is an error because any changes it has on events would have no effect on output: 

mysql> SET GLOBAL log_error_services = ’log_filter_internal’; ERROR 1231 (42000): Variable ’log_error_services’ can’t be set to the value of ’log_filter_internal’ 

To correct the problem, include a sink at the end of the value: 

mysql> SET GLOBAL log_error_services = ’log_filter_internal; log_sink_internal’; Query OK, 0 rows affected (0.00 sec) 

The combination of log_filter_internal  and log_sink_internal  implements the default error log filtering and output behavior. The action of these components is affected by other server options and system variables: 

•The output destination is determined by the --log-error  option (and, on Windows, --pid-file  and --console ). These determine whether to write error messages to the console or a file and, if to a file, the error log file name. See Section 5.4.2.2, “Default Error Log Destination Configuration” . 

•The log_error_verbosity  and log_error_suppression_list  system variables affect which types of log events log_filter_internal  permits or suppresses. See Section 5.4.2.5, “Priority- Based Error Log Filtering (log_filter_internal)” . 

To change the set of log components used for error logging, load components as necessary, perform any component-specific configuration, and modify the log_error_services  value. Adding or removing log components is subject to these constraints: 

•To add a log component to the list of enabled components: 

•Load the component using INSTALL COMPONENT  (unless it is built in or already loaded). 

•If the component exposes any system variables that must be set for component initialization to succeed, assign those variables appropriate values. 

