[development] watchdog() does not always work - or am I missingsomething?
karoly at negyesi.net
Wed Apr 22 17:26:09 UTC 2009
What is the issue link you filed for this bug then on drupal.org? :)
On Wed, Apr 22, 2009 at 9:51 AM, Dave Cohen <drupal at dave-cohen.com> wrote:
> Good call Frédéric. I just found messages in my /var/log/messages.log...
> query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES(1, 'php', '<em>Data too long for column &amp;#039;referer&amp;#039; at row 1
> I recently added sql_mode=STRICT_ALL_TABLES to my.cnf, in order to catch issues like this in my own modules. And that's the setting that tells mysql to fail rather than truncate the long values.
> On Tuesday 21 April 2009 23:16:02 Frédéric G. MARAND wrote:
>> I've seen a similar case, where watchdog wouldn't work because the referer
>> field was too long and the insert request in dblog failed almost silently
>> instead of truncating that field (innodb engine, not checked with myisam
>> engine): the request wasn't logged and the failure of that request wasn't
>> stored either, IIRC for the same reason. Had to see it in a debugger to
>> understand what was going on. You might want to try a debugger too.
More information about the development