Brian Stewart - 179 - Feb 12, 2015

Is it possible to request a custom RequestLogger for servicestack.
I want to log all requests in a custom storage container (in this case Azure Table Storage )
Thanks in advance

You can implement your own IRequestLogger or subclass InMemoryRollingRequestLogger and implement your own, here’s the impl RedisRequestLogger as an example:

https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Server/Host/RedisRequestLogger.cs

Then you can just configure to use it on the RequestLogsFeature, e.g:

Plugins.Add(new RequestLogsFeature {
    RequestLogger = new RedisRequestLogger(
        container.Resolve<IRedisClientsManager>(), capacity:1000)
});

Brian Stewart:

Excellent thanks - is this still valid for Servicestack 3 as i’ve yet to update on one of my apis…?

You can try, tho so much has changed since v3 that I couldn’t tell you if it has everything it needs.

Brian Stewart:

Yeah i just tried … didnt work unfortunately… i think i may have to attempt the move to v4…