Problem with $db_logging

Permalink
I am trying to learn more about how C5 works inside. So I added some debug/logging to dispatcher.php, using the database logging and debugging described byhttp://www.concrete5.org/documentation/developers/system/database-c...

Here are the changes I hacked in to dispatcher.php

140 if (C5_ENVIRONMENT_ONLY == false) {
141
142 // my debug stuff
143 $db = Loader::db();
144 $db->setDebug(true);
145 $db->setLogging(true);

Debug output works, but logging gives the error:
'ADODB_Exception' with message 'mysql error: [1146: Table 'concrete5.adodb_logsql' doesn't exist] ....

So is logging attempting to log to a table that does not exist yet, or am I missing something?

JohntheFish
 
Steff replied on at Permalink Reply
Steff
Hello JohntheFish

I had exactly the same problem. I ran this sql query in phpMyAdmin
CREATE TABLE adodb_logsql (
created datetime NOT NULL,
sql0 varchar(250) NOT NULL,
sql1 text NOT NULL,
params text NOT NULL,
tracer text NOT NULL,
timer decimal(16,6) NOT NULL)


now it works.

I have checked several C5 installations. None of them had the adodb_logsql table.

Kind regards,
Steff