Output filename in log msg if one is supplied

This commit is contained in:
Zach Copley 2010-11-02 23:13:20 +00:00
parent 5ccc548bbc
commit 764a297383

View File

@ -1499,6 +1499,7 @@ function common_request_id()
function common_log($priority, $msg, $filename=null)
{
if(Event::handle('StartLog', array(&$priority, &$msg, &$filename))){
$msg = (empty($filename)) ? $msg : basename($filename) . ' - ' . $msg;
$msg = '[' . common_request_id() . '] ' . $msg;
$logfile = common_config('site', 'logfile');
if ($logfile) {