2

ServiceStack's internal logging isn't something I want to have in my logs. How do we disable the internal logging, or at least suppress it so it doesn't clog the log?

mariocatch
  • 8,305
  • 8
  • 50
  • 71
  • This seems to be related: http://stackoverflow.com/questions/18868410/servicestack-how-to-disable-default-exception-logging – Anthony Sep 20 '13 at 14:39

2 Answers2

4

When configuring your LogManager just set it to an instance of NullLogFactory

LogManager.LogFactory = new NullLogFactory();
David
  • 8,340
  • 7
  • 49
  • 71
  • I still want to be able to log, I just don't want ServiceStack's internal logging to clog up my actual logging. I'd like to disable ServiceStack's internal logging (without recompiling ServiceStack). – mariocatch Sep 04 '13 at 14:53
  • 1
    In that case you can set EndpointHostConfig.DebugMode = false – David Sep 04 '13 at 15:01
  • Setting DebugMode to false didn't work for me - still getting internal ServiceStack errors. Example: ServiceStack.Host.Handlers.NotFoundHttpHandler – Stan Bashtavenko Jun 18 '16 at 17:28
1

ServiceStack Ver 5 >

SetConfig(new HostConfig {
            DefaultRedirectPath = "/metadata",
            DefaultContentType = MimeTypes.Json,
            AppendUtf8CharsetOnContentTypes = new HashSet<string> { MimeTypes.Html, MimeTypes.Json },
            DebugMode = false,
            LogFactory = new NullLogFactory(),
            EnableFeatures = Feature.All.Remove(disableFeatures)
)
Kabayan
  • 21
  • 2