Skip to content

Commit 4f13433

Browse files
committed
CherryPick Layout change and ProgramLogger.cs Fix
1 parent da6dfcd commit 4f13433

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,6 @@ public static async Task<List<Result>> QueryForPluginAsync(PluginPair pair, Quer
184184
// null will be fine since the results will only be added into queue if the token hasn't been cancelled
185185
return null;
186186
}
187-
catch (Exception e)
188-
{
189-
Log.Exception("PluginManager", "Exception", e);
190-
}
191187

192188
return results;
193189
}

Plugins/Flow.Launcher.Plugin.Program/Logger/ProgramLogger.cs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,6 @@ internal static class ProgramLogger
2020
{
2121
public const string DirectoryName = "Logs";
2222

23-
static ProgramLogger()
24-
{
25-
var path = Path.Combine(DataLocation.DataDirectory(), DirectoryName, Constant.Version);
26-
if (!Directory.Exists(path))
27-
{
28-
Directory.CreateDirectory(path);
29-
}
30-
31-
var configuration = new LoggingConfiguration();
32-
var target = new FileTarget();
33-
configuration.AddTarget("file", target);
34-
target.FileName = path.Replace(@"\", "/") + "/${shortdate}.txt";
35-
#if DEBUG
36-
var rule = new LoggingRule("*", LogLevel.Debug, target);
37-
#else
38-
var rule = new LoggingRule("*", LogLevel.Error, target);
39-
#endif
40-
configuration.LoggingRules.Add(rule);
41-
LogManager.Configuration = configuration;
42-
}
43-
4423
/// <summary>
4524
/// Logs an exception
4625
/// </summary>
@@ -101,6 +80,7 @@ internal static void LogException(string message, Exception e)
10180
{
10281
var logger = LogManager.GetLogger("");
10382
logger.Error(e, $"fail to log exception in program logger, parts length is too small: {parts.Length}, message: {message}");
83+
return;
10484
}
10585

10686
var classname = parts[0];

0 commit comments

Comments
 (0)