@@ -25,7 +25,7 @@ public function it_writes_to_info_level_for_non_error_logs(): void
2525
2626 $ logger ->expects ($ this ->once ())
2727 ->method ('info ' )
28- ->with ('{message} ' , ['message ' => 'test ' , 'user_id ' => 123 ]);
28+ ->with ('test ' , ['message ' => 'test ' , 'user_id ' => 123 ]);
2929
3030 $ logger ->expects ($ this ->never ())
3131 ->method ('error ' );
@@ -45,7 +45,7 @@ public function it_writes_to_error_level_for_error_logs(): void
4545
4646 $ logger ->expects ($ this ->once ())
4747 ->method ('error ' )
48- ->with ('{error} ' , ['error ' => 'Something went wrong ' , 'user_id ' => 123 ]);
48+ ->with ('Something went wrong ' , ['error ' => 'Something went wrong ' , 'user_id ' => 123 ]);
4949
5050 $ logger ->expects ($ this ->never ())
5151 ->method ('info ' );
@@ -65,7 +65,7 @@ public function it_writes_to_error_level_for_exception_logs(): void
6565
6666 $ logger ->expects ($ this ->once ())
6767 ->method ('error ' )
68- ->with ('{ error} ' , ['exception ' => 'RuntimeException ' , 'user_id ' => 123 ]);
68+ ->with ('Knotlog error ' , ['exception ' => 'RuntimeException ' , 'user_id ' => 123 ]);
6969
7070 $ logger ->expects ($ this ->never ())
7171 ->method ('info ' );
@@ -85,7 +85,7 @@ public function it_uses_custom_message_key(): void
8585
8686 $ logger ->expects ($ this ->once ())
8787 ->method ('info ' )
88- ->with ('{msg} ' , ['msg ' => 'custom message ' , 'user_id ' => 123 ]);
88+ ->with ('custom message ' , ['msg ' => 'custom message ' , 'user_id ' => 123 ]);
8989
9090 $ writer = new LoggerWriter ($ logger , messageKey: 'msg ' );
9191 $ writer ->write ($ log );
@@ -102,7 +102,7 @@ public function it_uses_custom_error_key(): void
102102
103103 $ logger ->expects ($ this ->once ())
104104 ->method ('error ' )
105- ->with ('{err} ' , ['error ' => 'Something went wrong ' , 'err ' => 'custom error ' ]);
105+ ->with ('custom error ' , ['error ' => 'Something went wrong ' , 'err ' => 'custom error ' ]);
106106
107107 $ writer = new LoggerWriter ($ logger , errorKey: 'err ' );
108108 $ writer ->write ($ log );
@@ -128,7 +128,7 @@ public function it_passes_entire_log_context_to_logger(): void
128128
129129 $ logger ->expects ($ this ->once ())
130130 ->method ('info ' )
131- ->with ('{message} ' , $ expectedContext );
131+ ->with ('Knotlog entry ' , $ expectedContext );
132132
133133 $ writer = new LoggerWriter ($ logger );
134134 $ writer ->write ($ log );
0 commit comments