rework the logging interface
This commit is contained in:
parent
eb5e6aae72
commit
2028e1695c
7 changed files with 47 additions and 67 deletions
12
boot.php
12
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;
|
||||
}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue