added the ability to log queryes to logfile when db_debug is true #1690

wants to merge 1 commit into from

6 participants


DB_driver.php now have the ability to log query's when the database config property db_debug is true like this:

$db['default']['db_debug'] = true;





Good PR. +1


Some folks might like to have db_debug turned on by default, logging every single query wouldn't be a pleasant surprise for them.


@narfbg Perhaps that should be brought up as a reason to make the logging system more fine-grained.

We only have 4 levels of logging. Perhaps we should have some sort of bit-flag system to make it more flexible?


It sets the logtype for log_message to debug. So if the main applications log level is set to something other than debug it will only be errors that will be logged to the log file


... which is pointless - when an error is encountered and db_debug is set to TRUE, script execution stops and the error is displayed on screen.

@timw4mail Probably ... there was a similar discussion in another thread a few weeks ago. You might want to take a look at it if you have some ideas.

@narfbg narfbg closed this Nov 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment