From 2028e1695c82685102a7eef7f75094267446a887 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 26 Oct 2010 22:09:13 -0700 Subject: rework the logging interface --- boot.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'boot.php') 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; +}} -- cgit v1.2.3