summaryrefslogtreecommitdiff
path: root/inc/infoutils.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-02-28 15:53:26 +0100
committerAndreas Gohr <andi@splitbrain.org>2009-02-28 15:53:26 +0100
commit0699d739cee759b163310ed441997743cf18943e (patch)
tree0e20be770f47505965066c6b60f91c2e7ac6bb1c /inc/infoutils.php
parentedcb01e585240a0977dded101c5e715aa365e9df (diff)
downloadrpg-0699d739cee759b163310ed441997743cf18943e.tar.gz
rpg-0699d739cee759b163310ed441997743cf18943e.tar.bz2
optional additional header for dbglog()
darcs-hash:20090228145326-7ad00-014ee0dbaa44197eb50423cfd45f4fd2fbe54f22.gz
Diffstat (limited to 'inc/infoutils.php')
-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){