Clone wiki

CakePHP Database Logger / Home

Simple database logger for CakePHP 2.0

This is used to replace the default FileLogger.

Based on database stream as described on

Why is this better than file log?

  • Easier to search
  • Handles large amount of logging much better
  • Has better performance (at least in some cases)


  1. Download the files.
  2. Add the files to your CakePHP project.
  3. Add this to bootstrap.php: CakeLog::config('default', array('engine' => 'DatabaseLogger', 'model'=>'LogEntry'));
  4. Run sql query to generate database table.

View logs

Visit /log_entries/index