From e96382fdd936706848796cba7a2354c162d080a9 Mon Sep 17 00:00:00 2001 From: bao-qian Date: Thu, 12 Jan 2017 19:52:37 +0000 Subject: [PATCH] auto change log level --- Wox.Infrastructure/Logger/Log.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Wox.Infrastructure/Logger/Log.cs b/Wox.Infrastructure/Logger/Log.cs index 41be9cff29..7e9f8acdb7 100644 --- a/Wox.Infrastructure/Logger/Log.cs +++ b/Wox.Infrastructure/Logger/Log.cs @@ -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; }