From 36a77c6db2272d7db31982642715034ce718552f Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 1 Nov 2010 17:56:36 -0700 Subject: build feeds rather than template them --- boot.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 2de398cfc..5837f14d3 100644 --- a/boot.php +++ b/boot.php @@ -8,6 +8,14 @@ define ( 'DFRN_PROTOCOL_VERSION', '2.0' ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); +// log levels + +define ( 'LOGGER_NORMAL', 0 ); +define ( 'LOGGER_TRACE', 1 ); +define ( 'LOGGER_DEBUG', 2 ); +define ( 'LOGGER_DATA', 3 ); +define ( 'LOGGER_ALL', 4 ); + // registration policy define ( 'REGISTER_CLOSED', 0 ); @@ -1281,12 +1289,13 @@ function attribute_contains($attr,$s) { }} if(! function_exists('logger')) { -function logger($msg) { +function logger($msg,$level = 0) { $debugging = get_config('system','debugging'); + $loglevel = intval(get_config('system','loglevel')); $logfile = get_config('system','logfile'); - if((! $debugging) || (! $logfile)) + if((! $debugging) || (! $logfile) || ($level > $loglevel)) return; @file_put_contents($logfile, datetime_convert() . ':' . session_id() . ' ' . $msg . "\n", FILE_APPEND); -- cgit v1.2.3