mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Move Log to Infrastructure project.
This commit is contained in:
parent
4db7577448
commit
87ce03e13e
17 changed files with 220 additions and 194 deletions
|
|
@ -32,8 +32,9 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\packages\Newtonsoft.Json.6.0.5\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net35" />
|
<package id="Newtonsoft.Json" version="6.0.5" targetFramework="net35" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
|
||||||
namespace Wox.Helper
|
namespace Wox.Infrastructure.Logger
|
||||||
{
|
{
|
||||||
public class Log
|
public class Log
|
||||||
{
|
{
|
||||||
|
|
@ -34,3 +34,4 @@ using System.Runtime.InteropServices;
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,14 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\log4net.2.0.3\lib\net35-full\log4net.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.6.0.5\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
|
|
@ -49,6 +54,7 @@
|
||||||
<Reference Include="WindowsBase" />
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Logger\Log.cs" />
|
||||||
<Compile Include="PeHeaderReader.cs" />
|
<Compile Include="PeHeaderReader.cs" />
|
||||||
<Compile Include="Storage\UserSettings\CustomizedPluginConfig.cs" />
|
<Compile Include="Storage\UserSettings\CustomizedPluginConfig.cs" />
|
||||||
<Compile Include="Storage\UserSettings\FolderLink.cs" />
|
<Compile Include="Storage\UserSettings\FolderLink.cs" />
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net35" />
|
<package id="log4net" version="2.0.3" targetFramework="net35" />
|
||||||
|
<package id="Newtonsoft.Json" version="6.0.5" targetFramework="net35" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -3,7 +3,9 @@ using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using log4net.Repository.Hierarchy;
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
|
using Log = Wox.Infrastructure.Logger.Log;
|
||||||
|
|
||||||
namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
|
namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
|
||||||
{
|
{
|
||||||
|
|
@ -52,11 +54,15 @@ namespace Wox.Plugin.SystemPlugins.Program.ProgramSources
|
||||||
}
|
}
|
||||||
catch (UnauthorizedAccessException e)
|
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)
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,13 @@
|
||||||
<Reference Include="INIFileParser">
|
<Reference Include="INIFileParser">
|
||||||
<HintPath>..\packages\ini-parser.2.0.2\lib\INIFileParser.dll</HintPath>
|
<HintPath>..\packages\ini-parser.2.0.2\lib\INIFileParser.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\log4net.2.0.3\lib\net35-full\log4net.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.6.0.5\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="ini-parser" version="2.0.2" targetFramework="net35" />
|
<package id="ini-parser" version="2.0.2" targetFramework="net35" />
|
||||||
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net35" />
|
<package id="log4net" version="2.0.3" targetFramework="net35" />
|
||||||
|
<package id="Newtonsoft.Json" version="6.0.5" targetFramework="net35" />
|
||||||
<package id="WindowsControlPanelItems.dll" version="1.0.0" targetFramework="net35" />
|
<package id="WindowsControlPanelItems.dll" version="1.0.0" targetFramework="net35" />
|
||||||
<package id="YAMP" version="1.3.0" targetFramework="net35" />
|
<package id="YAMP" version="1.3.0" targetFramework="net35" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Wox.Helper;
|
using Wox.Helper;
|
||||||
|
using Wox.Infrastructure.Logger;
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
using Wox.PluginLoader;
|
using Wox.PluginLoader;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ using System.Windows.Forms;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
using Wox.Infrastructure.Logger;
|
||||||
|
|
||||||
namespace Wox.Helper.ErrorReporting
|
namespace Wox.Helper.ErrorReporting
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ using System.Windows.Forms;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wox.Helper;
|
using Wox.Helper;
|
||||||
using Wox.Helper.ErrorReporting;
|
using Wox.Helper.ErrorReporting;
|
||||||
|
using Wox.Infrastructure.Logger;
|
||||||
using Wox.JsonRPC;
|
using Wox.JsonRPC;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
using MessageBox = System.Windows.MessageBox;
|
using MessageBox = System.Windows.MessageBox;
|
||||||
|
|
@ -72,7 +73,7 @@ namespace Wox.PluginLoader
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
ErrorReporting.TryShowErrorMessageBox(e.Message, e);
|
ErrorReporting.TryShowErrorMessageBox(e.Message, e);
|
||||||
Wox.Helper.Log.Error(e.Message);
|
Log.Error(e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Wox.Helper;
|
using Wox.Helper;
|
||||||
|
using Wox.Infrastructure.Logger;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
using Wox.Plugin.SystemPlugins;
|
using Wox.Plugin.SystemPlugins;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ using System.Reflection;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wox.Helper;
|
using Wox.Helper;
|
||||||
|
using Wox.Infrastructure.Logger;
|
||||||
using Wox.Infrastructure.Storage.UserSettings;
|
using Wox.Infrastructure.Storage.UserSettings;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
using Wox.Plugin.SystemPlugins;
|
using Wox.Plugin.SystemPlugins;
|
||||||
|
|
|
||||||
|
|
@ -53,4 +53,3 @@ using System.Windows;
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
|
|
||||||
|
|
@ -64,12 +64,14 @@
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="log4net">
|
<Reference Include="log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\log4net.2.0.3\lib\net35-full\log4net.dll</HintPath>
|
<HintPath>..\packages\log4net.2.0.3\lib\net35-full\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net35\Newtonsoft.Json.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.6.0.5\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NHotkey">
|
<Reference Include="NHotkey">
|
||||||
<HintPath>..\packages\NHotkey.1.1.0.0\lib\NHotkey.dll</HintPath>
|
<HintPath>..\packages\NHotkey.1.1.0.0\lib\NHotkey.dll</HintPath>
|
||||||
|
|
@ -133,7 +135,6 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Helper\DispatcherExtensions.cs" />
|
<Compile Include="Helper\DispatcherExtensions.cs" />
|
||||||
<Compile Include="Helper\DWMDropShadow.cs" />
|
<Compile Include="Helper\DWMDropShadow.cs" />
|
||||||
<Compile Include="Helper\Log.cs" />
|
|
||||||
<Compile Include="Helper\PluginInstaller.cs" />
|
<Compile Include="Helper\PluginInstaller.cs" />
|
||||||
<Compile Include="Helper\WoxException.cs" />
|
<Compile Include="Helper\WoxException.cs" />
|
||||||
<Compile Include="Helper\WoxPythonException.cs" />
|
<Compile Include="Helper\WoxPythonException.cs" />
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<packages>
|
<packages>
|
||||||
<package id="InputSimulator" version="1.0.4.0" targetFramework="net35" />
|
<package id="InputSimulator" version="1.0.4.0" targetFramework="net35" />
|
||||||
<package id="log4net" version="2.0.3" targetFramework="net35" />
|
<package id="log4net" version="2.0.3" targetFramework="net35" />
|
||||||
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net35" />
|
<package id="Newtonsoft.Json" version="6.0.5" targetFramework="net35" />
|
||||||
<package id="NHotkey" version="1.1.0.0" targetFramework="net35" />
|
<package id="NHotkey" version="1.1.0.0" targetFramework="net35" />
|
||||||
<package id="NHotkey.Wpf" version="1.1.0.0" targetFramework="net35" />
|
<package id="NHotkey.Wpf" version="1.1.0.0" targetFramework="net35" />
|
||||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net35" />
|
<package id="SharpZipLib" version="0.86.0" targetFramework="net35" />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue