I don't see how this can work. You're disconnecting the database connection in the debug plugin's constructor, which is very early in the application stack. You need to call disconnect() immediately before starting to grab the log data. As is, you'll get log data for any query run before the debug plugin is instantiated (so anything before the onAfterInitialise trigger is called).
I don't see how this can work. You're disconnecting the database connection in the debug plugin's constructor, which is very early in the application stack. You need to call
disconnect()
immediately before starting to grab the log data. As is, you'll get log data for any query run before the debug plugin is instantiated (so anything before theonAfterInitialise
trigger is called).