courgette/b3-plugin-chatlogger — Issue #2: DELETE FROM cmdlog WHERE msg_time
Author: courgette
Created: 2011-12-20 16:17:43+00:00
State: open

Mariodu62 [reported](http://forum.bigbrotherbot.net/plugins-by-courgette/chatlogger-plugin-v0-2-0/msg31387/#msg31387) an error.

This is due to a copy/paste error while implementing the "log commands" feature.

### log
```
111220 03:00:00	INFO	'ChatloggerPlugin: purge of chat messages older than 2 days ...'
111220 03:00:00	DEBUG	'ChatloggerPlugin: DELETE FROM chatlog WHERE msg_time < 1324173600'
111220 03:00:00	INFO	'ChatloggerPlugin: purge of commands older than 2 days ...'
111220 03:00:00	DEBUG	'ChatloggerPlugin: DELETE FROM cmdlog WHERE msg_time < 1324173600'
111220 03:00:00	ERROR	'[DELETE FROM cmdlog WHERE msg_time < 1324173600] None'
111220 03:00:00	ERROR	'Error executing crontab >: (1054, "Unknown column \'msg_time\' in \'where clause\'")\n[(\'y:\\\\b3_bf3\\\\b3\\\\cron.py\', 276, \'run\', \'c.run()\'), (\'y:\\\\b3_bf3\\\\b3\\\\cron.py\', 210, \'run\', \'CronTab.run(self)\'), (\'y:\\\\b3_bf3\\\\b3\\\\cron.py\', 66, \'run\', \'self.command()\'), (\'y:\\\\b3_bf3\\\\b3\\\\extplugins\\\\chatlogger.py\', 280, \'purge\', \'cursor = self.console.storage.query(q)\'), (\'y:\\\\b3_bf3\\\\b3\\\\storage\\\\database.py\', 313, \'query\', \'raise e\')]'
```