comparison Logger.inc @ 66:74f7b64bdb78

Lots of documentation fixes, and removal of unused function getXmlContent
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Thu, 11 Oct 2012 22:11:33 +0200
parents 7b87ec8b0842
children
comparison
equal deleted inserted replaced
65:7b87ec8b0842 66:74f7b64bdb78
1 <?php 1 <?php
2 /** 2 /**
3 * @file
4 * Common access point for logging 3 * Common access point for logging
5 */ 4 */
6 class Logger { 5 class Logger {
6 /**
7 * All logging goes through this function
8 *
9 * @param $level the severity level of this message
10 * @param $msg message to be logged
11 */
7 static function msg($level, $msg) 12 static function msg($level, $msg)
8 { 13 {
9 if (DEBUG_LEVEL >= $level) { 14 if (DEBUG_LEVEL >= $level) {
10 print $msg; 15 print $msg;
11 if(ABORT_ON_LOG) 16 if(ABORT_ON_LOG)
12 exit; 17 exit;
13 } 18 }
14 } 19 }
15 20
21 /**
22 * Convenience function, logs a message with level VERBOSITY_WARNING
23 *
24 * @param $msg message to be logged
25 */
16 static function warn($msg) 26 static function warn($msg)
17 { 27 {
18 self::msg(VERBOSITY_WARNING, $msg); 28 self::msg(VERBOSITY_WARNING, $msg);
19 } 29 }
20 } 30 }