|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Created by PhpStorm. |
|
4
|
|
|
* User: lenon |
|
5
|
|
|
* Date: 20/10/16 |
|
6
|
|
|
* Time: 23:51 |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace Aszone\Vulnerabilities\Log; |
|
10
|
|
|
|
|
11
|
|
|
use Psr\Log\LoggerInterface; |
|
12
|
|
|
|
|
13
|
|
|
class Logger implements LoggerInterface |
|
14
|
|
|
{ |
|
15
|
|
|
|
|
16
|
|
|
public function emergency($message, array $context = array()) |
|
17
|
|
|
{ |
|
18
|
|
|
$this->log("EMERGENCY", $message, $context); |
|
19
|
|
|
} |
|
20
|
|
|
|
|
21
|
|
|
public function alert($message, array $context = array()) |
|
22
|
|
|
{ |
|
23
|
|
|
$this->log("ALERT", $message, $context); |
|
24
|
|
|
} |
|
25
|
|
|
|
|
26
|
|
|
public function critical($message, array $context = array()) |
|
27
|
|
|
{ |
|
28
|
|
|
$this->log("CRITICAL", $message, $context); |
|
29
|
|
|
} |
|
30
|
|
|
|
|
31
|
|
|
public function error($message, array $context = array()) |
|
32
|
|
|
{ |
|
33
|
|
|
$this->log("ERROR", $message, $context); |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
public function warning($message, array $context = array()) |
|
37
|
|
|
{ |
|
38
|
|
|
$this->log("WARNING", $message, $context); |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
public function notice($message, array $context = array()) |
|
42
|
|
|
{ |
|
43
|
|
|
$this->log("NOTICE", $message, $context); |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
public function info($message, array $context = array()) |
|
47
|
|
|
{ |
|
48
|
|
|
$this->log("INFO", $message, $context); |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function debug($message, array $context = array()) |
|
52
|
|
|
{ |
|
53
|
|
|
$this->log("DEBUG", $message, $context); |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
public function log($level, $message, array $context = array()) |
|
57
|
|
|
{ |
|
58
|
|
|
echo $level . ": " . $message; |
|
59
|
|
|
} |
|
60
|
|
|
} |