~thirdplace/components

36518dfcf260f682632a4dab28c67fb1153d82ef — Dag 2 years ago b34766b
fix
1 files changed, 2 insertions(+), 1 deletions(-)

M src/logger/StreamHandler.php
M src/logger/StreamHandler.php => src/logger/StreamHandler.php +2 -1
@@ 15,10 15,11 @@ final class StreamHandler
    public function __invoke(array $record): void
    {
        if (isset($record['context']['e'])) {
            $e = $record['context']['e'];
            // todo: improve message
            $record['context']['message'] = $e->getMessage();
            $record['context']['code'] = $e->getCode();
            $record['context']['trace'] = create_sane_stacktrace($record['context']['e']);
            $record['context']['trace'] = create_sane_stacktrace($e);
        }
        if ($record['context'] === []) {
            $record['context'] = '';