1
1
Fork 0

rework the logging interface

This commit is contained in:
Mike Macgirvin 2010-10-26 22:09:13 -07:00
commit 2028e1695c
7 changed files with 47 additions and 67 deletions

View file

@ -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;
}}