MySQL logging format

Is there a way to configure how MySQL writes the error log? The multiline logging format makes it hard to parse into ELK (when using multiline, you can’t use multi threaded logstash). It would be much easier if the logs were in JSON. Is there a plugin or an option to do this (or could Percona include something in their binaries)?

Hi noodlesnz;

You could potentially try output the error log to syslog and see if that format suits your needs better:

[URL=“MySQL :: MySQL 8.0 Reference Manual :: 4.3.2 mysqld_safe — MySQL Server Startup Script”]https://dev.mysql.com/doc/refman/5.5...ld_safe_syslog[/URL]
[URL]https://dev.mysql.com/doc/refman/5.5/en/error-log.html[/URL]

-Scott

Thanks Scott, I’ll give that a go.