O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the system log for logging

To use the system log for logging, you need to load the system log writer called log_sink_syseventlog. You can use the built-in filter, log_filter_internal, for filtering:

  1. Load the system log writer:
mysql> INSTALL COMPONENT 'file://component_log_sink_syseventlog';Query OK, 0 rows affected (0.43 sec)
  1. Make it persistent across restarts:
mysql> SET PERSIST log_error_services = 'log_filter_internal; log_sink_syseventlog';Query OK, 0 rows affected (0.00 sec)mysql> SHOW VARIABLES LIKE 'log_error_services';+--------------------+-------------------------------------------+| Variable_name      | Value                                     |+--------------------+-------------------------------------------+| log_error_services | log_filter_internal; log_sink_syseventlog ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required