[
https://issues.apache.org/jira/browse/LOG4J2-1347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15222910#comment-15222910
]
John Strickler edited comment on LOG4J2-1347 at 4/2/16 2:59 PM:
----------------------------------------------------------------
Remko, I switched my strategy from a mixed async/sync approach to using
all-async by using {{AsyncLoggerContextSelector}}. I didn't initially see a
way to produce custom log events this way so I'm pairing it with ThreadContext.
I'm probably going to do away with custom logevent and custom converters.
I have to scale this to 40+ other products so I'm going to keep hammering at it
until I find the ideal solution.
was (Author: strickjb):
Remko, I switched from a mixed approach to using async everywhere by using
{{AsyncLoggerContextSelector}}. I didn't initially see a way to produce custom
log events this way so I'm pairing it with ThreadContext and doing away with
custom logevent and custom converters. I have to scale this out company-wide
so I'm going to keep hammering at it until I find the ideal solution.
> AsyncAppender - Allow serialization of custom LogEvents
> -------------------------------------------------------
>
> Key: LOG4J2-1347
> URL: https://issues.apache.org/jira/browse/LOG4J2-1347
> Project: Log4j 2
> Issue Type: Improvement
> Reporter: John Strickler
> Priority: Minor
>
> This request is for an improvement to AsyncAppender to allow sublasses of
> Log4jLogEvent to be serialized without losing their specific type.
> The current functionality is that AsyncAppender will serialize all subclasses
> back to a true instance of Log4jLogEvent. In the process, all extra
> information is lost that was provided by the subclass.
> _AsyncAppender, line 156:_
> bq. final Serializable serialized = Log4jLogEvent.serialize(coreEvent,
> includeLocation);
> *Use Case*
> Subclasses of Log4jLogEvent that contain the authenticated principal to be
> logged.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]