summaryrefslogtreecommitdiff
path: root/inc/common.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/common.php')
-rw-r--r--inc/common.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/common.php b/inc/common.php
index 975c70098..e47b4e7a3 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -695,6 +695,21 @@ function dbg($msg,$hidden=false){
}
/**
+ * Print info to a log file
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function dbglog($msg){
+ global $conf;
+ $file = $conf['cachedir'].'/debug.log';
+ $fh = fopen($file,'a');
+ if($fh){
+ fwrite($fh,date('H:i:s ').$_SERVER['REMOTE_ADDR'].': '.$msg."\n");
+ fclose($fh);
+ }
+}
+
+/**
* Add's an entry to the changelog
*
* @author Andreas Gohr <andi@splitbrain.org>