Completed
Push — master ( 425ada...d44d5c )
by Jean-Christophe
02:03
created

Logger::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
namespace micro\log;
3
require_once ROOT.DS.'micro/log/chromePhp.php';
4
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