mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
Refactoring error report
1. fix #627 2. fix #646 3. remove exceptionless
This commit is contained in:
@@ -9,10 +9,11 @@ namespace Wox.Infrastructure.Logger
|
||||
{
|
||||
public static class Log
|
||||
{
|
||||
public const string DirectoryName = "Logs";
|
||||
|
||||
static Log()
|
||||
{
|
||||
var directoryName = "Logs";
|
||||
var path = Path.Combine(Constant.DataDirectory, directoryName, Constant.Version);
|
||||
var path = Path.Combine(Constant.DataDirectory, DirectoryName, Constant.Version);
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
@@ -21,7 +22,7 @@ namespace Wox.Infrastructure.Logger
|
||||
var configuration = new LoggingConfiguration();
|
||||
var target = new FileTarget();
|
||||
configuration.AddTarget("file", target);
|
||||
target.FileName = "${specialfolder:folder=ApplicationData}/" + Constant.Wox + "/" + directoryName + "/" + Constant.Version + "/${shortdate}.log";
|
||||
target.FileName = "${specialfolder:folder=ApplicationData}/" + Constant.Wox + "/" + DirectoryName + "/" + Constant.Version + "/${shortdate}.log";
|
||||
var rule = new LoggingRule("*", LogLevel.Info, target);
|
||||
configuration.LoggingRules.Add(rule);
|
||||
LogManager.Configuration = configuration;
|
||||
|
||||
Reference in New Issue
Block a user