mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Better log info
This commit is contained in:
parent
96b6832dff
commit
89dc9e7e7f
2 changed files with 8 additions and 3 deletions
|
|
@ -18,6 +18,6 @@
|
||||||
<target xsi:type="File" name="file" fileName="${basedir}/Logs/${shortdate}.log"/>
|
<target xsi:type="File" name="file" fileName="${basedir}/Logs/${shortdate}.log"/>
|
||||||
</targets>
|
</targets>
|
||||||
<rules>
|
<rules>
|
||||||
<logger name="*" minlevel="Warn" writeTo="file" />
|
<logger name="*" minlevel="Info" writeTo="file" />
|
||||||
</rules>
|
</rules>
|
||||||
</nlog>
|
</nlog>
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using Wox.Infrastructure.Logger;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
|
|
||||||
namespace Wox.Infrastructure
|
namespace Wox.Infrastructure
|
||||||
|
|
@ -23,7 +24,9 @@ namespace Wox.Infrastructure
|
||||||
_stopwatch.Stop();
|
_stopwatch.Stop();
|
||||||
long seconds = _stopwatch.ElapsedMilliseconds;
|
long seconds = _stopwatch.ElapsedMilliseconds;
|
||||||
_stopwatch.Start();
|
_stopwatch.Start();
|
||||||
Debug.WriteLine(_name + " : " + _stopwatch.ElapsedMilliseconds + "ms");
|
string info = _name + " : " + _stopwatch.ElapsedMilliseconds + "ms";
|
||||||
|
Debug.WriteLine(info);
|
||||||
|
Log.Info(info);
|
||||||
return seconds;
|
return seconds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -32,7 +35,9 @@ namespace Wox.Infrastructure
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_stopwatch.Stop();
|
_stopwatch.Stop();
|
||||||
Debug.WriteLine(_name + ":" + _stopwatch.ElapsedMilliseconds + "ms");
|
string info = _name + " : " + _stopwatch.ElapsedMilliseconds + "ms";
|
||||||
|
Debug.WriteLine(info);
|
||||||
|
Log.Info(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue