Logg inbound request and it's data

is there built in functions to handle logging on some specific services.
I want to logg what data is sent to the service and be able to look on it on a later time.
This should be done in a production environment


Not clear on exactly what you’re after but you can register the Request Logger to log the HTTP Requests received. By default it uses an InMemoryRollingRequestLogger which lets you view requests received during that AppDomain restart, for persistent logs you can use the built-in CsvRequestLogger or RedisRequestLogger see docs for examples. The Request Logger logs Service Requests by default but you can control which requests to log with the SkipLogging predicate, e.g the example below logs HTTP requests to /admin*, MyRequest1 and MyRequest2 Services as well as any Request DTOs that implement a custom ILogRequest interface:

Plugins.Add(new RequestLogsFeature
    SkipLogging = req => !(req.PathInfo.StartsWith("/admin") 
        || req.Dto is MyRequest1 
        || req.Dto is MyRequest2 
        || req.Dto is ILogRequest)

You can use the #if !DEBUG conditional compilation or DebugMode property to handle logic in Release + production builds.

Thx, that was what i was looking for.
But when i try to enable it it says

Funq.ResolutionException: ‘Required dependency of type ServiceStack.Redis.IRedisClientsManager could not be resolved.’

I tried to google it and found that i should change from client profile to full but I cant im having anything wrong.

Please guide me.

If you’re using Redis you need to register Redis Client Manager.