List:Internals« Previous MessageNext Message »
From:Paolo Lunazzi Date:November 12 2009 12:09pm
Subject:Re: access log
View as plain text  
On Wed, Nov 11, 2009 at 7:49 PM, Davi Arnaut <Davi.Arnaut@stripped> wrote:

> OK, in this case you have two options. You can do post-filtering on the log
> tables -- for example, by having a periodic event that scans the log table
> and filters the data to another table.
Yes, this could be an simple and instant solution but the fun is all
in the second option ;)

> Another option is to implement a new log handler -- if you look at file
> sql/log.h, there is a abstract Log_event_handler class that you can extend
> to implement a new log target (eg: Log_to_csv_event_handler).
>
> You will probably be interested in the log_general method, where you can
> access various information about the current user session (THD). For some
> initial fun, you could look around sql/log.cc and play with the log_general
> method of the class Log_to_csv_event_handler or Log_to_file_event_handler.
> If you know your way around C++, shouldn't be difficult.
Thank you very much to this useful information, I'm starting to look
into these source files.
Now I'm thinking how to implement user groups and as soon as I switch
from abstract to concrete idea I will expose it to you. One possible
way is to check users grants and take only full privileges users but
it's not a reliable nor versatile solution. First of all I have to
study users and logging mysql implementation so let me thinking about
:)

Best regards,
PL
Thread
access logPaolo Lunazzi11 Nov
  • Re: access logDavi Arnaut11 Nov
    • Re: access logPaolo Lunazzi11 Nov
      • Re: access logDavi Arnaut11 Nov
        • RE: access logRick James11 Nov
          • RE: access logGavin Towey11 Nov
            • Re: access logSergei Golubchik12 Nov
            • Re: access logPaolo Lunazzi12 Nov
        • Re: access logPaolo Lunazzi12 Nov