Skip to content

LogRecord->with does not transfers "formatted" value #1788

Open
@Justinas-Jurciukonis

Description

@Justinas-Jurciukonis

Monolog version 3.2.0

When PsrLogMessageProcessor processes message, it returns new instance of LogRecord using code

return $record->with(message: strtr($record->message, $replacements), context: $context);

and inside LogRecord->with there is missing formatted key to be copied over, so if any previous processor set any information inside LogRecord->formatted it will be lost.

Seems like same issue with toArray

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions