jj: update Logging to 0.0.0.4
This commit is contained in:
parent
e54b1d2843
commit
7fa329a349
@ -3,27 +3,19 @@ Imports NLog
|
|||||||
Imports NLog.Config
|
Imports NLog.Config
|
||||||
Imports NLog.Targets
|
Imports NLog.Targets
|
||||||
|
|
||||||
|
''' <module>LogConfig</module>
|
||||||
|
''' <version>0.0.0.4</version>
|
||||||
|
''' <date>02.10.2018</date>
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' MODULE: LogConfig
|
''' Module that writes file-logs to different locations:
|
||||||
'''
|
|
||||||
''' VERSION: 0.0.0.3
|
|
||||||
'''
|
|
||||||
''' DATE: 02.10.2018
|
|
||||||
'''
|
|
||||||
''' DESCRIPTION: Module that writes file-logs to different locations:
|
|
||||||
''' local application data, the current directory or a custom path.
|
''' local application data, the current directory or a custom path.
|
||||||
''' Files and directories will be automatically created.
|
''' Files and directories will be automatically created.
|
||||||
'''
|
''' </summary>
|
||||||
''' Three different logfiles will be generated:
|
''' <dependencies>
|
||||||
'''
|
''' NLog, >= 4.5.8
|
||||||
''' - Default: Info and Warn Log Levels
|
''' </dependencies>
|
||||||
''' - Error: Warn, Error and Fatal Log Level
|
''' <params>
|
||||||
''' - Debug: Debug Log Level
|
''' logPath, PathType
|
||||||
'''
|
|
||||||
'''
|
|
||||||
''' DEPENDENCIES: NLog, >= 4.5.8
|
|
||||||
'''
|
|
||||||
''' PARAMETERS: logPath, PathType
|
|
||||||
''' The basepath to write logs to. Can be AppData, CurrentDirectory or CustomPath.
|
''' The basepath to write logs to. Can be AppData, CurrentDirectory or CustomPath.
|
||||||
'''
|
'''
|
||||||
''' - AppData: writes to local application data directory
|
''' - AppData: writes to local application data directory
|
||||||
@ -35,8 +27,9 @@ Imports NLog.Targets
|
|||||||
'''
|
'''
|
||||||
''' suffix, String (optional)
|
''' suffix, String (optional)
|
||||||
''' If set to anything other than Nothing, extends the logfile name with this suffix.
|
''' If set to anything other than Nothing, extends the logfile name with this suffix.
|
||||||
'''
|
''' </params>
|
||||||
''' PROPERTIES: LogFile, String (readonly)
|
''' <props>
|
||||||
|
''' LogFile, String (readonly)
|
||||||
''' Returns the full path of the default log file.
|
''' Returns the full path of the default log file.
|
||||||
'''
|
'''
|
||||||
''' LogPath, String (readonly)
|
''' LogPath, String (readonly)
|
||||||
@ -47,8 +40,9 @@ Imports NLog.Targets
|
|||||||
'''
|
'''
|
||||||
''' Debug, Boolean
|
''' Debug, Boolean
|
||||||
''' Determines if the debug log should be written.
|
''' Determines if the debug log should be written.
|
||||||
'''
|
''' </props>
|
||||||
''' EXAMPLES: Imports DigitalData.Modules.Logging
|
''' <example>
|
||||||
|
''' Imports DigitalData.Modules.Logging
|
||||||
'''
|
'''
|
||||||
''' Class FooProgram
|
''' Class FooProgram
|
||||||
''' Private Logger as Logger
|
''' Private Logger as Logger
|
||||||
@ -75,8 +69,9 @@ Imports NLog.Targets
|
|||||||
''' Logger.Info("Baz")
|
''' Logger.Info("Baz")
|
||||||
''' End Sub
|
''' End Sub
|
||||||
''' End Class
|
''' End Class
|
||||||
'''
|
''' </example>
|
||||||
''' REMARKS: If logpath can not be written to, falls back to temp folder as defined in:
|
''' <remarks>
|
||||||
|
''' If logpath can not be written to, falls back to temp folder as defined in:
|
||||||
''' https://docs.microsoft.com/de-de/dotnet/api/system.io.path.gettemppath?view=netframework-4.7.2
|
''' https://docs.microsoft.com/de-de/dotnet/api/system.io.path.gettemppath?view=netframework-4.7.2
|
||||||
'''
|
'''
|
||||||
''' If used in a service, LogPath must be set to CustomPath, otherwise the Log will be written to System32!
|
''' If used in a service, LogPath must be set to CustomPath, otherwise the Log will be written to System32!
|
||||||
@ -84,7 +79,7 @@ Imports NLog.Targets
|
|||||||
''' For NLog Troubleshooting, set the following Environment variables to write the NLog internal Log:
|
''' For NLog Troubleshooting, set the following Environment variables to write the NLog internal Log:
|
||||||
''' - NLOG_INTERNAL_LOG_LEVEL: Debug
|
''' - NLOG_INTERNAL_LOG_LEVEL: Debug
|
||||||
''' - NLOG_INTERNAL_LOG_FILE: ex. C:\Temp\Nlog_Internal.log
|
''' - NLOG_INTERNAL_LOG_FILE: ex. C:\Temp\Nlog_Internal.log
|
||||||
''' </summary>
|
''' </remarks>
|
||||||
Public Class LogConfig
|
Public Class LogConfig
|
||||||
Private Const KEEP_FILES_OPEN As Boolean = False
|
Private Const KEEP_FILES_OPEN As Boolean = False
|
||||||
' MAX_ARCHIVES_FILES works like this (in version 4.5.8):
|
' MAX_ARCHIVES_FILES works like this (in version 4.5.8):
|
||||||
@ -161,7 +156,7 @@ Public Class LogConfig
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Initializes a new Logger for a specific `Product` and optinally a filename-suffix.
|
''' Initializes a new LogConfig object with a logpath and optinally a filename-suffix.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
''' <param name="logPath">The basepath to write logs to. Can be AppData, CurrentDirectory or CustomPath.</param>
|
''' <param name="logPath">The basepath to write logs to. Can be AppData, CurrentDirectory or CustomPath.</param>
|
||||||
''' <param name="customLogPath">If `logPath` is set to custom, this defines the custom logPath.</param>
|
''' <param name="customLogPath">If `logPath` is set to custom, this defines the custom logPath.</param>
|
||||||
|
|||||||
@ -45,7 +45,8 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.5.8\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.5.10\lib\net45\NLog.dll</HintPath>
|
||||||
|
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
|
|||||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("0.0.0.3")>
|
<Assembly: AssemblyVersion("0.0.0.4")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.5.8" targetFramework="net461" />
|
<package id="NLog" version="4.5.10" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
Loading…
x
Reference in New Issue
Block a user