CakePHP 的日志文件放置在目录 app/tmp/logs/ 下,下面是几个例子
//Executing this inside a CakePHP class:
$this->log("Something didn't work!");
//结果追加到 app/tmp/logs/error.log
2007-11-02 10:22:02 Error: Something didn't work!
//Executing this inside a CakePHP class:
$this->log('A debugging message.', LOG_DEBUG);
//结果追加到 app/tmp/logs/debug.log (rather than error.log)
2007-11-02 10:22:02 Error: A debugging message.
//Executing this inside a CakePHP class:
$this->log('A special message for activity logging', 'activity');
//结果追加到 app/tmp/logs/activity.log (rather than error.log)
2007-11-02 10:22:02 Activity: A special message for activity logging