Skip to content

Commit

Permalink
Issue #56: Avoid Drupal::logger() in the controller.
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed Dec 3, 2024
1 parent dee080a commit 8952021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/ViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function editor(Media $media, $edit = FALSE) {
$error_msg = (string) $this->t('Viewer error: @message', [
'@message' => $render_array ? $render_array['error'] : 'NULL',
]);
\Drupal::logger('cool')->error($error_msg);
$this->getLogger('cool')->error($error_msg);
return new Response(
$error_msg,
Response::HTTP_BAD_REQUEST,
Expand Down

0 comments on commit 8952021

Please sign in to comment.