auto change log level

This commit is contained in:
bao-qian
2017-01-12 19:52:37 +00:00
parent a486319cc2
commit e96382fdd9

View File

@@ -25,7 +25,11 @@ namespace Wox.Infrastructure.Logger
configuration.AddTarget("file", target);
target.FileName = "${specialfolder:folder=ApplicationData}/" + Constant.Wox + "/" + DirectoryName + "/" +
Constant.Version + "/${shortdate}.txt";
#if DEBUG
var rule = new LoggingRule("*", LogLevel.Debug, target);
#else
var rule = new LoggingRule("*", LogLevel.Info, target);
#endif
configuration.LoggingRules.Add(rule);
LogManager.Configuration = configuration;
}