Pear Log 101
require_once 'Log.php';
$logger = &Log::singleton('file', 'debug.log', 'TEST');
$logger->log('debug message', PEAR_LOG_DEBUG);
不同檔案內,需設定不同logger file位置的問題,這以下這樣,每個檔案都要重新設定debug.log的位置 另一種較好的解法是將$logger定義成global variables
$logger = &Log::singleton('file', '..\logs\debug.log', 'TEST');
Resource
- tail
- you can using tail to monitoring logfile (you can using tail as external tools in Eclipse, it will keep outputting out eclipse console)