FreeAndNil opened a new issue, #362:
URL: https://github.com/apache/logging-log4net/issues/362
A buffering appender fixes the shared `LoggingEvent` so it can be sent later
from another thread.
Around that fix, context gets lost or taken from the wrong thread:
- Fixing locks the event's cache for all fields. With `fix="Partial"` the
appenders after the
buffering one, in the same logging call and on the same thread, get no
`Identity`, location,
thread name or domain anymore. ANT-2026-JY0R8A0K.
- When a buffered event is fixed again with more flags (a `Partial` buffer
in front of
`AdoNetAppender`, a mail appender or `MemoryAppender`), the second fix
runs on the flushing thread
and stores that thread's identity and call site in the event.
ANT-2026-BH0P93PP.
- Behind a buffer whose `Fix` leaves out `Properties`, `%property`, `%mdc`,
`%ndc` and property
filters read the flushing thread's context, not the logging thread's.
ANT-2026-FE7I6RPI.
- `%aspnet-context`, `%aspnet-request`, `%aspnet-session` and
`%aspnet-cache` read the current
request when the record is rendered, so behind a buffer they show the
flushing request, or
`NOT AVAILABLE`. ANT-2026-O0DMJJ34.
Proposed fix: let the logging thread read every field while it delivers the
event, and lock it
afterwards; a later fix on another thread no longer captures thread-bound
fields, and property reads
off the logging thread no longer see that thread's context. Values that used
to be wrong are then
empty instead. Document that the `%aspnet-*` converters do not belong behind
a buffering appender.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]