Event logging module API implemented.
Minor fix in core.db.php