File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 12
12
class ExceptionLogService implements ExceptionLogServiceInterface {
13
13
use LoggerAwareTrait;
14
14
15
+ const MESSAGE_ERROR = 'InternalServerError ' ;
16
+ const MESSAGE_INFO = 'Exception was thrown ' ;
17
+
15
18
/**
16
19
* @param HttpExceptionInterface $exception
17
20
*/
@@ -22,9 +25,9 @@ public function logHttpException(HttpExceptionInterface $exception): void {
22
25
23
26
$ context = FlattenExceptionHelper::createFromThrowable ($ exception )->toArray ();
24
27
if ($ exception ->getStatusCode () >= 500 ) {
25
- $ this ->logger ->error (" InternalServerError " , $ context );
28
+ $ this ->logger ->error (self :: MESSAGE_ERROR , $ context );
26
29
} else {
27
- $ this ->logger ->info (" Exception was thrown " , $ context );
30
+ $ this ->logger ->info (self :: MESSAGE_INFO , $ context );
28
31
}
29
32
}
30
33
You can’t perform that action at this time.
0 commit comments