dropwizard-gelf
dropwizard-gelf copied to clipboard
More advanced filtering of messages in GelfLoggingFilter
Hi there,
we're currently using the GelfLoggingFilter to log access requests. Since our loadbalancers send HTTP pings to a special endpoint, this creates a lot of noise, that we don't need in our logs.
I would love to extend the current GelfLoggingFilter implementation by adding an optional filtering parameter to the GelfLoggingFilter constructor that will be called in the logRequest method, when we have access to both the response and the request and drop such (matching an url and response code 200) access messages.
To make this as extensible as possible, I would suggest the usage of a functional interface that receives all the parameters that the receives the last four parameters that the logRequest method gets.
Would you accept such an addition? If so, I will prepare a MR.
Thanks
@madmuffin1 Sure, we can give it a go. Looking forward to your pull request!