mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +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;
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace Wox.Infrastructure
|
||||
public static readonly string PreinstalledDirectory = Path.Combine(ProgramDirectory, Plugins);
|
||||
public static readonly string SettingsPath = Path.Combine(DataDirectory, Settings);
|
||||
public const string Github = "https://github.com/Wox-launcher/Wox";
|
||||
public const string Issue = "https://github.com/Wox-launcher/Wox/issues/new";
|
||||
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location).ProductVersion;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user