1 | <?php |
||
13 | class Logger implements LoggerInterface |
||
14 | { |
||
15 | |||
16 | use LoggerTrait; |
||
17 | |||
18 | /** @var bool Debug mode */ |
||
19 | public $debug = false; |
||
20 | |||
21 | /** @var \League\CLImate\CLImate */ |
||
22 | protected $cli; |
||
23 | |||
24 | 9 | public function __construct(CLImate $climate) |
|
28 | |||
29 | /** |
||
30 | * Handle logging different log levels |
||
31 | * @param mixed $level |
||
32 | * @param string $message |
||
33 | * @param array $context |
||
34 | */ |
||
35 | 9 | public function log($level, $message, array $context = array()) |
|
52 | |||
53 | /** |
||
54 | * Handle info types |
||
55 | * |
||
56 | * @param $level |
||
57 | * @param $message |
||
58 | * @param array $context |
||
59 | */ |
||
60 | 6 | private function handleInfo($level, $message, array $context) |
|
64 | |||
65 | /** |
||
66 | * Handle debub types |
||
67 | * |
||
68 | * @param $level |
||
69 | * @param $message |
||
70 | * @param array $context |
||
71 | */ |
||
72 | 6 | private function handleDebug($level, $message, array $context) |
|
78 | |||
79 | /** |
||
80 | * Handle Errors |
||
81 | * |
||
82 | * @param $level |
||
83 | * @param $message |
||
84 | * @param array $context |
||
85 | */ |
||
86 | 3 | private function handleError($level, $message, array $context) |
|
90 | |||
91 | /** |
||
92 | * Interpolate context into a message. |
||
93 | * This is copied directly from PSR-3 documentation |
||
94 | * |
||
95 | * @param $message |
||
96 | * @param array $context |
||
97 | * @return string |
||
98 | */ |
||
99 | 9 | public function interpolate($message, array $context = array()) |
|
113 | } |
||
114 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.