Skip to content

Commit

Permalink
JsonToStdErrHandler fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yapro committed May 6, 2024
1 parent 9711ef8 commit 1569de6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Handler/JsonToStdErrHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected function write(array $record): void
public function getMessage(array $record): string
{
if (isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] === 'dev') {
return json_encode($record, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT);
return json_encode($this->varHelper->dump($record), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT);
}
$result = $this->getJson($record);
if ($this->isMessageShort($result)) {
Expand Down Expand Up @@ -162,6 +162,6 @@ public function isMessageShort(string $record): bool

public function getJson(array $record): string
{
return json_encode($record, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR);
return json_encode($this->varHelper->dump($record), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR);
}
}

0 comments on commit 1569de6

Please sign in to comment.