Skip to content
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

Configurable/wrappable Dispatch #5

Closed
tmc opened this issue May 8, 2013 · 2 comments
Closed

Configurable/wrappable Dispatch #5

tmc opened this issue May 8, 2013 · 2 comments

Comments

@tmc
Copy link
Contributor

tmc commented May 8, 2013

I was looking for a nice way of logging every request but it seems like the explicit calls to http.HandlerFunc (providing it Dispatch) make this a bit tough.

@emicklei
Copy link
Owner

emicklei commented May 8, 2013

Yes, agree. One of the design changes I have on mind is to introduce
request and response filters. Then logging can part of the response chain.

On Wednesday, May 8, 2013, Travis Cline wrote:

I was looking for a nice way of logging every request but it seems like
the explicit calls to http.HandlerFunc (providing it Dispatch) make this a
bit tough.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5
.

^ Ernest Micklei

@emicklei
Copy link
Owner

fyi, the filters branch has an implementation of Filters as mentioned earlier. You can add multiple chained filters on global, webservice and route level. Each filter can use information for the request or response. Using this , you can generic logging, authentication, metrices etc. I have added an example of filters as the first proof of implementation. Have to write some tests and docs before merging it into the master. Any comments are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants