summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/infoutils.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 46bccf82f..ac59d9488 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -280,12 +280,14 @@ function dbg($msg,$hidden=false){
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function dbglog($msg){
+function dbglog($msg,$header=''){
global $conf;
if(is_object($msg) || is_array($msg)){
$msg = print_r($msg,true);
}
+ if($header) $msg = "$header\n$msg";
+
$file = $conf['cachedir'].'/debug.log';
$fh = fopen($file,'a');
if($fh){