I am building a custom RequestLogger to DynamoDb using the PocoDynamo Feature.
I am just overriding the InMemoryRollingRequestLogger. Seems pretty straight forward.
public class DynamoRequestLogger : InMemoryRollingRequestLogger
public override void Log(IRequest request, object requestDto, object response, TimeSpan requestDuration)
if (ShouldSkip(request, requestDto)) return; var requestType = requestDto?.GetType(); var entry = CreateEntry(request, requestDto, response, requestDuration, requestType); Db.PutItem<RequestLogEntry>(entry); }
However, persisting the object to dynamo in this fashion does not serialize the request or response dtos (just the type name).
What is the best approach to store the serialized DTO data?