[MDEV-5662] Slow Query / General Log / Error log rotation Created: 2014-02-12 Updated: 2016-12-20 Resolved: 2016-12-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Admin statements |
| Fix Version/s: | 10.0.11 |
| Type: | Task | Priority: | Minor |
| Reporter: | Joffrey MICHAIE (Inactive) | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 6 |
| Labels: | gsoc16 | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Hi, there is no buit-in rotation for these logs in MariaDB. As this can be easily scripted in Unix systems, this is another story for Windows. Wouldn't it be easy to implement rotation, the same way as the audit plugin does? Joffrey |
| Comments |
| Comment by Sergei Golubchik [ 2014-04-17 ] |
|
I'd say "rewrite slow/general/error logs to use the logger service".
A thought:
|
| Comment by Peter McLarty [ 2015-03-15 ] |
|
I have setup log rotation using the new unix_socket plugin to authenticate without password. This solves getting logrotate to work. I have had it running for a month without issues on a Redhat server |
| Comment by Sergei Golubchik [ 2015-04-17 ] |
|
Yes, that's a very good idea! |
| Comment by Daniel Black [ 2015-04-20 ] |
|
Note the SQL_ERROR_LOG already does its own size based rotation.
Er yuck!
Having the patch in The other issue with logrotation on RHEL machines is the selinux permission on the datadir can't also be labeled to make logrotate to hande Another way is to at least normalize the internally logging so its compatible with a systemd journal API http://www.freedesktop.org/wiki/Software/systemd/catalog/ |
| Comment by Sergei Golubchik [ 2015-04-28 ] |
|
Yes, of course. When we'll have an internal logging API used consistently for all logs, it would be easy to extend it to log to systemd journal or to syslog or anywhere else. |
| Comment by Rick James (Inactive) [ 2015-10-09 ] |
|
| Comment by Daniel Black [ 2016-12-19 ] |
|
This was added in https://github.com/MariaDB/server/commit/ac647f5a3 documentation updated: https://mariadb.com/kb/en/mariadb/flush/ |