arkturuz has asked for the wisdom of the Perl Monks concerning the following question:
I have a web application with at least 100 SQL queries (never counted them), scattered through various modules for various purposes. I connect to a MySQL database via DBI module.
I would like to log every query execution into a file, ie. to write in the file something like:
execution_timestamp, full_query
The problem is that every query is prepared and executed wheen needed in the program, so I should go through all the sources and add a function to write the log for each succesfull query execution, which is bad (tm).
So, is there a way of enabling that kind of logging in DBI (or MySQL itself) on a global execution level?
Thnx for answers!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to log SQL query execution in DBI
by Zaxo (Archbishop) on Nov 28, 2005 at 16:21 UTC | |
by Fletch (Bishop) on Nov 28, 2005 at 16:29 UTC | |
|
Re: How to log SQL query execution in DBI
by tirwhan (Abbot) on Nov 28, 2005 at 16:27 UTC | |
by arkturuz (Curate) on Nov 28, 2005 at 16:50 UTC | |
|
Re: How to log SQL query execution in DBI
by Fletch (Bishop) on Nov 28, 2005 at 16:27 UTC |