1313use OCP \IConfig ;
1414use OCP \Log \ILogFactory ;
1515use Psr \Log \LoggerInterface ;
16+ use Psr \Log \LogLevel ;
17+ use Stringable ;
1618
1719/**
1820 * Logger that logs in the context chat log file instead of the normal log file
@@ -35,39 +37,39 @@ public function getLogFilepath(): string {
3537 return $ this ->config ->getAppValue (Application::APP_ID , 'logfile ' , $ default );
3638 }
3739
38- public function emergency ($ message , array $ context = []): void {
40+ public function emergency (Stringable | string $ message , array $ context = []): void {
3941 $ this ->parentLogger ->emergency ($ message , $ context );
4042 }
4143
42- public function alert ($ message , array $ context = []): void {
44+ public function alert (Stringable | string $ message , array $ context = []): void {
4345 $ this ->parentLogger ->alert ($ message , $ context );
4446 }
4547
46- public function critical ($ message , array $ context = []): void {
48+ public function critical (Stringable | string $ message , array $ context = []): void {
4749 $ this ->parentLogger ->critical ($ message , $ context );
4850 }
4951
50- public function error (string $ message , array $ context = []): void {
51- $ this ->parentLogger ->critical ($ message , $ context );
52+ public function error (Stringable | string $ message , array $ context = []): void {
53+ $ this ->parentLogger ->error ($ message , $ context );
5254 }
5355
54- public function warning (string $ message , array $ context = []): void {
55- $ this ->parentLogger ->critical ($ message , $ context );
56+ public function warning (Stringable | string $ message , array $ context = []): void {
57+ $ this ->parentLogger ->warning ($ message , $ context );
5658 }
5759
58- public function notice ($ message , array $ context = []): void {
59- $ this ->parentLogger ->critical ($ message , $ context );
60+ public function notice (Stringable | string $ message , array $ context = []): void {
61+ $ this ->parentLogger ->notice ($ message , $ context );
6062 }
6163
62- public function info (string $ message , array $ context = []): void {
63- $ this ->parentLogger ->critical ($ message , $ context );
64+ public function info (Stringable | string $ message , array $ context = []): void {
65+ $ this ->parentLogger ->info ($ message , $ context );
6466 }
6567
66- public function debug (string $ message , array $ context = []): void {
67- $ this ->parentLogger ->critical ($ message , $ context );
68+ public function debug (Stringable | string $ message , array $ context = []): void {
69+ $ this ->parentLogger ->debug ($ message , $ context );
6870 }
6971
70- public function log ($ level , $ message , array $ context = []): void {
71- $ this ->parentLogger ->critical ( $ message , $ context );
72+ public function log (LogLevel $ level , Stringable | string $ message , array $ context = []): void {
73+ $ this ->parentLogger ->log ( $ level , $ message , $ context );
7274 }
7375}
0 commit comments