1
0
mirror of https://github.com/romanlryji/EventLogLoader.git synced 2024-11-28 08:48:40 +02:00

NLog 4.4.1 support

This commit is contained in:
Alex Bochkov 2017-01-10 20:54:33 -08:00
parent 388a868a57
commit c6a9ed642a
4 changed files with 16 additions and 13 deletions

View File

@ -96,9 +96,9 @@
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\NLog.4.4.1\lib\net45\NLog.dll</HintPath>
<HintPath>C:\Program Files (x86)\NLog\.NET Framework 2.0\NLog.dll</HintPath> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
@ -179,7 +179,9 @@
<None Include="Nlog.config"> <None Include="Nlog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="packages.config" /> <None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5"> <BootstrapperPackage Include="Microsoft.Net.Client.3.5">

View File

@ -982,7 +982,7 @@ Public Class EventLogProcessor
End If End If
Catch ex As Exception Catch ex As Exception
Log.ErrorException("Error occurred while working with reference file", ex) Log.Error(ex, "Error occurred while working with reference file")
End Try End Try
@ -1062,7 +1062,7 @@ Public Class EventLogProcessor
End If End If
Catch ex As Exception Catch ex As Exception
Log.ErrorException("Error occurred while working with reference tables", ex) Log.Error(ex, "Error occurred while working with reference tables")
End Try End Try
End Sub End Sub
@ -1122,7 +1122,7 @@ Public Class EventLogProcessor
LoadEvents(File) LoadEvents(File)
End If End If
Catch ex As Exception Catch ex As Exception
Log.ErrorException("Error in FindAndStartParseFiles", ex) Log.Error(ex, "Error in FindAndStartParseFiles")
End Try End Try
End If End If
@ -1268,7 +1268,7 @@ Public Class EventLogProcessor
Conn.Dispose() Conn.Dispose()
Catch ex As Exception Catch ex As Exception
Log.ErrorException("Error while working with EventLog table (SQLite)", ex) Log.Error(ex, "Error while working with EventLog table (SQLite)")
End Try End Try
@ -1542,7 +1542,7 @@ Public Class EventLogProcessor
FindAndStartParseFiles() FindAndStartParseFiles()
Catch ex As Exception Catch ex As Exception
Log.ErrorException("Error occurred during log file processing (" + InfobaseName + ")", ex) Log.Error(ex, "Error occurred during log file processing (" + InfobaseName + ")")
End Try End Try
Threading.Thread.Sleep(SleepTime) Threading.Thread.Sleep(SleepTime)

View File

@ -73,7 +73,7 @@ Public Class EventLogLoaderService
Log.Error("File config.json was not found!") Log.Error("File config.json was not found!")
End If End If
Catch ex As Exception Catch ex As Exception
Log.ErrorException("Parameters cannot be load from config.json file (it may be corrupted)", ex) Log.Error(ex, "Parameters cannot be load from config.json file (it may be corrupted)")
End Try End Try
@ -138,7 +138,7 @@ Public Class EventLogLoaderService
Try Try
IB.GetInfobaseIDFromDatabase() IB.GetInfobaseIDFromDatabase()
Catch ex As Exception Catch ex As Exception
Log.ErrorException("Error occurred while getting infobase ID from target database (" + IB.InfobaseName + ")", ex) Log.Error(ex, "Error occurred while getting infobase ID from target database (" + IB.InfobaseName + ")")
Continue For Continue For
End Try End Try
@ -153,7 +153,7 @@ Public Class EventLogLoaderService
i = i + 1 i = i + 1
Catch ex As Exception Catch ex As Exception
Log.ErrorException("Error occurred while starting new thread (" + IB.InfobaseName + ")", ex) Log.Error(ex, "Error occurred while starting new thread (" + IB.InfobaseName + ")")
End Try End Try
Next Next
@ -320,7 +320,7 @@ Public Class EventLogLoaderService
Catch ex As Exception Catch ex As Exception
Log.ErrorException("Error occurred while during target database tables verification", ex) Log.Error(ex, "Error occurred while during target database tables verification")
End Try End Try

View File

@ -5,5 +5,6 @@
<package id="MySql.Data" version="6.9.9" targetFramework="net45" /> <package id="MySql.Data" version="6.9.9" targetFramework="net45" />
<package id="NEST" version="5.0.0-rc4" targetFramework="net46" /> <package id="NEST" version="5.0.0-rc4" targetFramework="net46" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="NLog" version="4.4.1" targetFramework="net46" />
<package id="System.Data.SQLite.Core" version="1.0.104.0" targetFramework="net46" /> <package id="System.Data.SQLite.Core" version="1.0.104.0" targetFramework="net46" />
</packages> </packages>