Refactoring error report

1. fix #627
2. fix #646
3. remove exceptionless
This commit is contained in:
bao-qian
2016-05-20 21:16:25 +01:00
parent e4c7842f34
commit 646b7a3118
11 changed files with 143 additions and 139 deletions

View File

@@ -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;

View File

@@ -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;
}
}