ServiceStack response filter “short circuiting” causing problems

杀马特。学长 韩版系。学妹 提交于 2019-12-12 09:55:01

问题


We have embraced SS as our REST server platform and love it - one of the recurring issues I face deals with logging requests that have been "short circuited" for one legitimate reason or another (errors, missing mandatory headers, etc).

I am finding that I have to add extra logging code to many different code exit (ie short circuited) points because I still want to capture the request in the logs. Am I doing something wrong here? is there a way to specify a "mandatory response filter" that occurs even after short circuiting. I could see multiple uses for this beyond just logging...

Thanks in advance,

Jordan


回答1:


You can override the AppHost.OnEndRequest() which gets called at the end of each request.



来源:https://stackoverflow.com/questions/28883800/servicestack-response-filter-short-circuiting-causing-problems

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!