Closed cosminardeleanu closed 1 year ago
@Seldaek ^^
I confirm the issue persists with 3.4.0
. Waiting for the merge 🤞
@Seldaek with the migration to an object in Monolog 3, this is indeed an issue for handler-level processors rather than logger-level processors. Should the logger clone the record before calling the handler ?
Yeah I think it'd be better to clone.. both in Logger and in GroupHandler and related handlers which fan out records to nested handlers. Otherwise the problem is just shifted one problem lower.
indeed, fan-out handlers also need to clone.
Alright I think with my commit it should take care of it for all cases. I hope I didn't forget any fan-out handler.
Context:
$logRecord->extra['new_entry_just_for_elastic_search'] = 'stuff';
Why this is happening?
extra
, so if one handlers manages to alter this object, rest of remaining handlers, will use the altered object.