mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 04:37:30 +02:00
auto change log level
This commit is contained in:
@@ -25,7 +25,11 @@ namespace Wox.Infrastructure.Logger
|
|||||||
configuration.AddTarget("file", target);
|
configuration.AddTarget("file", target);
|
||||||
target.FileName = "${specialfolder:folder=ApplicationData}/" + Constant.Wox + "/" + DirectoryName + "/" +
|
target.FileName = "${specialfolder:folder=ApplicationData}/" + Constant.Wox + "/" + DirectoryName + "/" +
|
||||||
Constant.Version + "/${shortdate}.txt";
|
Constant.Version + "/${shortdate}.txt";
|
||||||
|
#if DEBUG
|
||||||
|
var rule = new LoggingRule("*", LogLevel.Debug, target);
|
||||||
|
#else
|
||||||
var rule = new LoggingRule("*", LogLevel.Info, target);
|
var rule = new LoggingRule("*", LogLevel.Info, target);
|
||||||
|
#endif
|
||||||
configuration.LoggingRules.Add(rule);
|
configuration.LoggingRules.Add(rule);
|
||||||
LogManager.Configuration = configuration;
|
LogManager.Configuration = configuration;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user