1 | <?php |
||
5 | class Logger{ |
||
6 | public static $test; |
||
7 | public static function init(){ |
||
8 | Logger::$test=$GLOBALS["config"]["debug"]; |
||
9 | \ChromePhp::getInstance()->addSetting(\ChromePhp::BACKTRACE_LEVEL, 2); |
||
10 | } |
||
11 | public static function log($id,$message){ |
||
12 | if(Logger::$test) |
||
13 | \ChromePhp::log($id.":".$message); |
||
14 | } |
||
15 | public static function warn($id,$message){ |
||
16 | if(Logger::$test) |
||
17 | \ChromePhp::warn($id.":".$message); |
||
18 | } |
||
19 | public static function error($id,$message){ |
||
20 | if(Logger::$test) |
||
21 | \ChromePhp::error($id.":".$message); |
||
22 | } |
||
23 | } |
||
24 |