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?
配置 LogManager 时,只需将其设置为 NullLogFactory 的实例
LogManager.LogFactory = new NullLogFactory();
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)
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.