File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1919
2020class BuffLog {
2121
22+ private $ logger ;
23+
24+ public function debug ($ message )
25+ {
26+ $ this ->getLogger ()->debug ($ message );
27+ }
28+
29+ public function info ($ message )
30+ {
31+ $ this ->getLogger ()->info ($ message );
32+ }
33+
34+ public function warn ($ message )
35+ {
36+ $ this ->getLogger ()->warn ($ message );
37+ }
38+
39+
40+ public function error ($ message )
41+ {
42+ $ this ->getLogger ()->error ($ message );
43+ }
44+
45+ public function critical ($ message )
46+ {
47+ $ this ->getLogger ()->critical ($ message );
48+ }
49+
2250 protected function createLogger ()
2351 {
2452 $ logger = new Logger ('php-bufflog ' );
@@ -29,4 +57,13 @@ protected function createLogger()
2957 return $ logger ;
3058 }
3159
60+ public function getLogger ()
61+ {
62+ if (!isset ($ this ->logger )) {
63+ $ this ->logger = $ this ->createLogger ();
64+ }
65+
66+ return $ this ->logger ;
67+ }
68+
3269}
You can’t perform that action at this time.
0 commit comments