Better logger

1. Throw exception for fatal/error log when debugging
2. Write to debug output for warn/debug/info log when debugging
3. part of #355
This commit is contained in:
bao-qian
2015-11-07 17:32:58 +00:00
parent 7d52b0cc96
commit 705354a3d6
26 changed files with 85 additions and 95 deletions

View File

@@ -32,6 +32,7 @@ using IDataObject = System.Windows.IDataObject;
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
using MenuItem = System.Windows.Forms.MenuItem;
using MessageBox = System.Windows.MessageBox;
using Stopwatch = Wox.Infrastructure.Stopwatch;
using ToolTip = System.Windows.Controls.ToolTip;
namespace Wox
@@ -852,10 +853,14 @@ namespace Wox
private void UpdateResultViewInternal(List<Result> list)
{
Dispatcher.Invoke(new Action(() =>
if (list != null && list.Count > 0)
{
pnlResult.AddResults(list);
}));
Dispatcher.Invoke(new Action(() =>
{
Stopwatch.Normal($"UI update cost for {list[0].PluginDirectory.Split('\\').Last()}",
() =>{pnlResult.AddResults(list);});
}));
}
}
private Result GetTopMostContextMenu(Result result)