I would like to log the entire request & response pair for a servicestack webservice. I've looked at the response filer, however the stream exposed is read only.
相关问题
- How do I hide routes I don't control from Serv
- I want to trace logs using a Macro multi parameter
- Can ServiceStack JsonServiceClient send a get requ
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
相关文章
- how do I log requests and responses for debugging
- how do I log requests and responses for debugging
- Android Studio doesn't display logs by package
- Stacktrace does not print in Glassfish 4.1 Cluster
- Out of curiosity — why don't logging APIs impl
- Check authorize in SignalR attribute
- Laravel log file based on date
- Java -How to get logger to work in shutdown hook?
Have you seen ServiceStack's built-in Request Logger Plugin? It's a configurable in-memory Request Logger that maintains a log / (error responses) of the recent requests.
If you would like a different behaviour, you can implement and register your own IRequestLogger, it gets called for every request. It's log method gets called for every request with the following parameters.
You can also retrieve the IHttpRequest / IHttpRespnse pair from the Request Context with:
From here you can get the original ASP.NET/HttpListener Request / Response types with
Filtering the response
Otherwise the ways to introspect the Response is with either