1 | <?php |
||
19 | class Log4PhpToPsrLoggerAdapter extends Logger |
||
20 | { |
||
21 | /** @var LoggerInterface */ |
||
22 | private $psrLogger; |
||
23 | |||
24 | /** |
||
25 | * Log4PhpToPsrLoggerAdapter constructor. |
||
26 | * |
||
27 | * @param LoggerInterface $psrLogger |
||
28 | */ |
||
29 | public function injectPsrLogger(LoggerInterface $psrLogger) |
||
33 | |||
34 | |||
35 | /** |
||
36 | * Log a message object with the TRACE level. |
||
37 | * |
||
38 | * @param mixed $message message |
||
39 | * @param Exception $throwable Optional throwable information to include |
||
40 | * in the logging event. |
||
41 | */ |
||
42 | public function trace($message, $throwable = null) |
||
46 | |||
47 | /** |
||
48 | * Log a message object with the DEBUG level. |
||
49 | * |
||
50 | * @param mixed $message message |
||
51 | * @param Exception $throwable Optional throwable information to include |
||
52 | * in the logging event. |
||
53 | */ |
||
54 | public function debug($message, $throwable = null) |
||
58 | |||
59 | /** |
||
60 | * Log a message object with the INFO Level. |
||
61 | * |
||
62 | * @param mixed $message message |
||
63 | * @param Exception $throwable Optional throwable information to include |
||
64 | * in the logging event. |
||
65 | */ |
||
66 | public function info($message, $throwable = null) |
||
70 | |||
71 | /** |
||
72 | * Log a message with the WARN level. |
||
73 | * |
||
74 | * @param mixed $message message |
||
75 | * @param Exception $throwable Optional throwable information to include |
||
76 | * in the logging event. |
||
77 | */ |
||
78 | public function warn($message, $throwable = null) |
||
82 | |||
83 | /** |
||
84 | * Log a message object with the ERROR level. |
||
85 | * |
||
86 | * @param mixed $message message |
||
87 | * @param Exception $throwable Optional throwable information to include |
||
88 | * in the logging event. |
||
89 | */ |
||
90 | public function error($message, $throwable = null) |
||
94 | |||
95 | /** |
||
96 | * Log a message object with the FATAL level. |
||
97 | * |
||
98 | * @param mixed $message message |
||
99 | * @param Exception $throwable Optional throwable information to include |
||
100 | * in the logging event. |
||
101 | */ |
||
102 | public function fatal($message, $throwable = null) |
||
106 | |||
107 | /** |
||
108 | * Log a message using the provided logging level. |
||
109 | * |
||
110 | * @param LoggerLevel $level The logging level. |
||
111 | * @param mixed $message Message to log. |
||
112 | * @param Exception $throwable Optional throwable information to include |
||
113 | * in the logging event. |
||
114 | */ |
||
115 | public function log(LoggerLevel $level, $message, $throwable = null) |
||
136 | } |
||
137 |