Hi,
I’m trying to configure csv request logging for error logging in a ServiceStack project, I got it set up and it’s logging requests to the csv file however it’s not logging errors, I’m doing a simple throw new Exception("test error");
in a service but the log just logs the request with StatusCode 200 and totally empty ResponseDto and error/exception cells.
The error log file is also not created.
I’m setting it up like so:
Plugins.Add(new RequestLogsFeature
{
RequestLogger = new CsvRequestLogger(
new FileSystemVirtualFiles(HostContext.Config.WebHostPhysicalPath),
"requestlogs/{year}-{month}/{year}-{month}-{day}.csv",
"requestlogs/{year}-{month}/{year}-{month}-{day}-errors.csv",
TimeSpan.FromSeconds(1)
),
EnableResponseTracking = true,
EnableRequestBodyTracking = true,
EnableErrorTracking = true
});
I’ve tried throwing specific exceptions like ArgumentException
too with no success.
ServiceStack is at V6.6
Any help would be appreciated.