I'm just getting started with ServiceStack, and I'd like to find out if it's possible to remove the stacktrace from the standard error response.
I have tried shutting off debugmode without any luck:
public override void Configure(Funq.Container container)
{
SetConfig(new EndpointHostConfig { DebugMode = false, });
}
Thanks a bunch!
By default the configuration below only removes the StackTrace from being externally visible in your Web Service's response:
SetConfig(new EndpointHostConfig { DebugMode = false, });
I've tested this again and it works as expected.
To disable Logging all together you can set ServiceStack to use a NullLogFactory
LogManager.LogFactory = new NullLogFactory();
Alternatively you can control the granularity of all logging by creating your own ServiceStack.Logging adapter and setting it in the same way:
LogManager.LogFactory = new MyCustomLogFactory();
I was worried about the stack trace before and did some testing about it.
I found out that in the default case you don't need to set this option. If the project is built in Release then the stack trace is not in the response.