You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
proposed implementation
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
We would be happy to see your pull request on this.
No need to bump the minor, if you leave the old LogFormatter in com.twitter.finagle.http.filter, there shouldn't be any API breakage.
I agree with the rest of your proposition, maybe should you use logException instead of logError (I'm fine with both).
motivation
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.
proposed implementation
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
who
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.
misc
I'm interested in hearing suggestions, or reasons why we don't want to do this.
The text was updated successfully, but these errors were encountered: