Bug #78712 Add option to write slow query log to syslog
Submitted: 6 Oct 2015 6:07 Modified: 3 Dec 2015 8:33
Reporter: Valeriy Kravchuk Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Logging Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: log_output, slow query log, syslog

[6 Oct 2015 6:07] Valeriy Kravchuk
Description:
MySQL 5.7 added features to direct error log and statements executed in mysql client to syslog (see https://dev.mysql.com/doc/refman/5.7/en/mysql-nutshell.html):

"Logging.  These logging enhancements were added:

    Previously, on Unix and Unix-like systems, MySQL support for sending the server error log to syslog was implemented by having mysqld_safe capture server error output and pass it to syslog. The server now includes native syslog support, which has been extended to include Windows. For more information about sending server error output to syslog, see Section 5.2.2, “The Error Log”.

    The mysql client now has a --syslog option that causes interactive statements to be sent to the system syslog facility. Logging is suppressed for statements that match the default “ignore” pattern list ("*IDENTIFIED*:*PASSWORD*"), as well as statements that match any patterns specified using the --histignore option. See Section 4.5.1.3, “mysql Logging”."

It would be nice to have a way to log slow query log to syslog directly, maybe with some "ignore" pattern support.

How to repeat:
Try to get slow query log entries in syslog without writing the content to any local file.

Suggested fix:
Implement SYSLOG as one of accepted values of --log-output option or add some other way to direct (slected) slow queries to syslog facility.
[3 Dec 2015 8:33] MySQL Verification Team
Hello Valeriy,

Thank you for the feature request!

Thanks,
Umesh