Move Log to Infrastructure project.

This commit is contained in:
qianlifeng
2014-09-19 16:57:48 +08:00
parent 4db7577448
commit 87ce03e13e
17 changed files with 220 additions and 194 deletions

View File

@@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using log4net.Repository.Hierarchy;
using Wox.Infrastructure.Storage.UserSettings;
using Log = Wox.Infrastructure.Logger.Log;
namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
{
@@ -52,11 +54,15 @@ namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
}
catch (UnauthorizedAccessException e)
{
Debug.WriteLine(string.Format("Can't access to directory {0}", path), "WoxDebug");
Log.Warn(string.Format("Can't access to directory {0}", path));
}
catch (DirectoryNotFoundException e)
{
//no-operation
Log.Warn(string.Format("Directory {0} doesn't exist", path));
}
catch (PathTooLongException e)
{
Log.Warn(string.Format("File path too long: {0}", e.Message));
}
}