aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-11-01 17:56:36 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-11-01 17:56:36 -0700
commit36a77c6db2272d7db31982642715034ce718552f (patch)
treeb71d1b16ef426e16a2da6b770f42962cc78c6fc4 /boot.php
parent4f4d6bace60fa3f43efeb675ba4f1617a9d9df58 (diff)
downloadvolse-hubzilla-36a77c6db2272d7db31982642715034ce718552f.tar.gz
volse-hubzilla-36a77c6db2272d7db31982642715034ce718552f.tar.bz2
volse-hubzilla-36a77c6db2272d7db31982642715034ce718552f.zip
build feeds rather than template them
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php13
1 files changed, 11 insertions, 2 deletions
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', "<br />\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);