-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide an additional way to configure the RecordFormatter when using the FluencyBuilderForFluentd #365
Comments
@frosiere Even with How about this? public class CustomFluencyLogbackAppender extends FluencyLogbackAppender<ILoggingEvent> {
@Override
protected FluencyBuilderForFluentd configureFluency() {
final var builder = new FluencyBuilderForFluentd();
// "setJacksonModulesForRecordFormatter" is too verbose...?
builder.setJacksonModulesForRecordFormatter(Lists.newArrayList(
new Jdk8Module(),
new JavaTimeModule()
));
return builder;
}
} |
Good point, proposal is nice and prevents using a wrong formatter. So, this may be the way to go. An alternative would either be a method taking the FluentdRecordFormatter like From a more general point of view, only the solution exposing the formatter gives a way to "setup" (enable/disable feature, etc) the internal ObjectMapper by overriding the method AbstractRecordFormatter#registerObjectMapperModules. Thanks a lot for your reply. |
Yeah, |
Perfect. If I drop a PR, would it be possible to have a 2.6.1 release soon? |
In some situations, it may be required to customize the RecordFormatter (additional Jackson modules, etc). There is currently a method taking a RecordFormatter and an Ingester (FluencyBuilderForFluentd#buildFromIngester(RecordFormatter recordFormatter, Ingester ingester)) which is nice is some cases.
The configuration becomes complex and requires a bunch of copy/paste when used in combination with the FluencyLogbackAppender
Therefore, to ease the configuration, and dissociate the customization of the recorder from the ingester, it would be great to update the FluencyBuilderForFluentd as follow
At appender level, this would allow the following customization
Any other suggestions to support this use case would be appreciated.
Thanks a lot for your help and for the Fluency support.
The text was updated successfully, but these errors were encountered: