[MDEV-19729] Standardize MariaDB Server logs and improve log formats documentation Created: 2019-06-11  Updated: 2021-01-20

Status: Open
Project: MariaDB Server
Component/s: Server
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Doino Gretchenliev (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-19730 Improve log formats documentation Open

 Description   

I've developed Fluentd plugins for parsing MariaDB Server logs. During the process of development I noticed the following:

  • log formats are loosely defined in the documentation. There are no strict definition for file log formats, which makes developing a parser, a job of back engineering the log and testing it agains self generated log messages, instead of just implementing a spec. I think the documentation should include log format specification, like this:
    Error log:

    (date:<yyyy-MM-dd hh:mm:ss|yyyyMMdd hh:mm:ss>) <[(logger)]> (message)
    

  • there are no common field names. For example, the audit log defines two field called "identification numbers". I'm not sure how to name each field(e.g.: id_1, id_2) and which of them is mapped to general query log(thread_id, server_id). or slow query log(Id)
  • log are not following common structure. For example, general query log outputs multiline events and slow query log a single line events.
  • some logs have header lines on top of the file, some don't.


 Comments   
Comment by Ian Gilfillan [ 2019-06-11 ]

Will create and link separate documentation task, leaving this for the server component

Comment by Doino Gretchenliev (Inactive) [ 2019-06-25 ]

Another improvement, that I've missed, while creating this ticket is the need of self rotating logs. By the time of writing only audit log is self rotated. Probably worth implementing this feature, as setup logrotate utility requires extra effort for each Server installation.

Generated at Thu Feb 08 08:53:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.