mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
CherryPick Layout change and ProgramLogger.cs Fix
This commit is contained in:
parent
da6dfcdf6d
commit
4f13433913
2 changed files with 1 additions and 25 deletions
|
|
@ -184,10 +184,6 @@ namespace Flow.Launcher.Core.Plugin
|
|||
// null will be fine since the results will only be added into queue if the token hasn't been cancelled
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception("PluginManager", "Exception", e);
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,27 +20,6 @@ namespace Flow.Launcher.Plugin.Program.Logger
|
|||
{
|
||||
public const string DirectoryName = "Logs";
|
||||
|
||||
static ProgramLogger()
|
||||
{
|
||||
var path = Path.Combine(DataLocation.DataDirectory(), DirectoryName, Constant.Version);
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
|
||||
var configuration = new LoggingConfiguration();
|
||||
var target = new FileTarget();
|
||||
configuration.AddTarget("file", target);
|
||||
target.FileName = path.Replace(@"\", "/") + "/${shortdate}.txt";
|
||||
#if DEBUG
|
||||
var rule = new LoggingRule("*", LogLevel.Debug, target);
|
||||
#else
|
||||
var rule = new LoggingRule("*", LogLevel.Error, target);
|
||||
#endif
|
||||
configuration.LoggingRules.Add(rule);
|
||||
LogManager.Configuration = configuration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs an exception
|
||||
/// </summary>
|
||||
|
|
@ -101,6 +80,7 @@ namespace Flow.Launcher.Plugin.Program.Logger
|
|||
{
|
||||
var logger = LogManager.GetLogger("");
|
||||
logger.Error(e, $"fail to log exception in program logger, parts length is too small: {parts.Length}, message: {message}");
|
||||
return;
|
||||
}
|
||||
|
||||
var classname = parts[0];
|
||||
|
|
|
|||
Loading…
Reference in a new issue