Hello, I'd like to propose a new logging_query plugin. The plugin is still, in Mark's words from 2008, "currently very rough and crude: logging far too much, in an awkward log format" (http://fallenpegasus.livejournal.com/759373.html). And as https://bugs.launchpad.net/drizzle/+bug/723915 notes, it's not tested either.
I think the CSV format will not serve users well in the long run for the following reasons. 1) Without a header there's no way to know which values are what. Andrew mentioned via a comment to another blog post that this may be added but there are still other problems... 2) When should the header be printed? Probably every time the log is opened. Once would surely not be enough. In any case, chances are that whenever or wherever it's printed it will get lost in a big log file. So either a user will have to search for it by eye, or a log parsing tool will have to search for it before it can know how to parse the log. 3) Queries are flattened which may not be desirable in all cases. Sometimes we want to get the original query from the log. If a value has a line in it like col="line1 line2" then this will be lost. 4) CSV requires quoting and escaping which, for one, adds overhead to the plugin and, for two, makes the job of a log parsing tool more difficult. 5) I'm sure that more information will be added to the Drizzle query log over time, just as more was added to the MySQL slow log. This will make the CSV format even more unwieldy and quite possibly variable making the issue of headers even more troublesome. 6) Query logs are basically useless without a tool to parse them. The currently log format will need its own tool, but if it used the MySQL slow log format, then there are already several tools that could parse it. So I propose to rewrite logging_query in the style of the MySQL slow log format but without all its gotchas, fluff and other stuff that make parsing it a real pita. If Drizzle is not fondly attached to logging_query in its current state, then I would like to rewrite it. Yay, nay? -Daniel
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

