jglassco
jglassco

Reputation: 133

ServiceStack response filter "short circuiting" causing problems

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

Upvotes: 3

Views: 113

Answers (1)

mythz
mythz

Reputation: 143399

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

Upvotes: 1

Related Questions