Hello,

I am working on a logging extension to dropwizard's logging. I've submitted 
https://github.com/dropwizard/dropwizard/issues/2893. Copying here for 
context:

I would like to decorate my logs with some data in MDC that needs to be 
captured synchronously at the time of logging. Namely - open tracing IDs.

In logback-classic, the user can configure the async appender in XML, so I 
don't have to do anything special there.

In Dropwizard 1.3, all appenders seem to be async, but the 
AsyncAppenderFactory doesn't inherit from Discoverable and doesn't appear 
to be injectable via configuration. In order to use my AsyncAppender, I 
have to derive from each individual AppenderFactory and override wrapAsync to 
use my AppenderFactory.

I would like to open a PR that would:

   1. Make AsyncAppenderFactory inherit from Discoverable
   2. Add a configuration parameter under logging that would support 
   setting this (similar to LayoutFactory and AppenderFactory instances today).
   3. Use AsyncLoggingEventAppenderFactory by default if not configured

I'm open to:

   - Being wrong; I may have missed something when reading the code
   - Other ways of implementing this; Discoverable seems to be the 
   consistent pattern
   - The name and placement of the config parameter in logging
   - Whether or not this would apply to the request logs (my default is no, 
   since request logs are typically very specific and rarely customized as 
   much).
   - The JsonTypeName applied to the default 
   AsyncLoggingEventAppenderFactory


I plan to start working on this shortly. Is there any discussion that 
should happen on this list prior to diving in?

Thanks,
Jeff 

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dropwizard-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dropwizard-dev/280f91a1-6352-4fb8-b23c-472a7c6e2b47%40googlegroups.com.

Reply via email to