Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Make LoggingFilter Generic #143
The code for LoggingFilter is already extremely generic, but it only works for Http, basically because it was written for finagle-http. My proposal is to finagle it to work for any protocol.
I was implementing a generic LoggingFilter, and realized that it was basically a copy of the http version, which seems dumb. I think it's a pretty useful thing, and I'd like to be able to use the raw finagle version.
Move the LoggingFilter and LogFormatter code over to finagle-core making them generic, and leave a LoggingFilter and LogFormatter in finagle-http, but marked as deprecated. Bump the minor version. In the next major version, strip the http versions.
We should also add a logError method to the LoggingFilter class, so that we can log exceptions differently from completions.
The proposed method signature for logError would be
def logError(responseTime: Duration, request: Req, error: Throwable)
I'd be happy to do it, and will assign it to myself after we've reached a consensus on what we want to do.
I'm interested in hearing suggestions, or reasons why we don't want to do this.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Sorry for the delay again.
We would be happy to see your pull request on this.
I agree with the rest of your proposition, maybe should you use