PEAR Log

http://pear.github.io/Log/

error_log に出力

$conf = array('lineFormat'=>'%2$s: %4$s');
$logger = Log::singleton('error_log', PEAR_LOG_TYPE_SYSTEM, 'ident', $conf);
for ($i = 0; $i < 10; $i++) {
$logger->log("Log entry $i");
}