aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-26 22:09:13 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-26 22:09:13 -0700
commit2028e1695c82685102a7eef7f75094267446a887 (patch)
tree45101cd992941eaf90f3844b49e4cf90fbb8e599 /boot.php
parenteb5e6aae7273fef06a06f983fe78aaad737aa729 (diff)
downloadvolse-hubzilla-2028e1695c82685102a7eef7f75094267446a887.tar.gz
volse-hubzilla-2028e1695c82685102a7eef7f75094267446a887.tar.bz2
volse-hubzilla-2028e1695c82685102a7eef7f75094267446a887.zip
rework the logging interface
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index 1c00598b3..5cb091eae 100644
--- a/boot.php
+++ b/boot.php
@@ -1276,3 +1276,15 @@ function attribute_contains($attr,$s) {
return false;
}}
+if(! function_exists('logger')) {
+function logger($msg) {
+
+ $debugging = get_config('system','debugging');
+ $logfile = get_config('system','logfile');
+
+ if((! $debugging) || (! $logfile))
+ return;
+
+ @file_put_contents($logfile, datetime_convert() . ':' . session_id() . ' ' . $msg . "\n", FILE_APPEND);
+ return;
+}}