From 764a297383ad8160b3e4d645d8953ef46a541b09 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 2 Nov 2010 23:13:20 +0000 Subject: [PATCH] Output filename in log msg if one is supplied --- lib/util.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util.php b/lib/util.php index d50fa20814..47e52c9152 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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) {