Total Complexity | 5 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Coverage | 72.72% |
Changes | 0 |
1 | <?php |
||
13 | trait LogTrait |
||
14 | { |
||
15 | /** |
||
16 | * @var LoggerInterface |
||
17 | */ |
||
18 | private static $logger; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private static $logFormatter; |
||
24 | |||
25 | /** |
||
26 | * @param LoggerInterface $logger |
||
27 | * |
||
28 | * @throws Exception |
||
29 | */ |
||
30 | 1 | public static function setLogger(LoggerInterface $logger) |
|
33 | 1 | } |
|
34 | |||
35 | /** |
||
36 | * @return LoggerInterface |
||
37 | */ |
||
38 | 72 | public static function getLogger() |
|
39 | { |
||
40 | 72 | return self::$logger; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * Apache Common Log Format. |
||
45 | * |
||
46 | * @param string $formatter |
||
47 | * |
||
48 | * @link http://httpd.apache.org/docs/2.4/logs.html#common |
||
49 | * @see \GuzzleHttp\MessageFormatter |
||
50 | */ |
||
51 | public static function setLogFormatter($formatter) |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | 2 | public static function getLogFormatter() |
|
65 | } |
||
66 | } |
||
67 |