MS V2.7 .Net Logger etc

This commit is contained in:
2021-06-15 16:28:55 +02:00
parent e2619eb3ad
commit e796ae91cb
109 changed files with 295499 additions and 8793 deletions

View File

@@ -2,6 +2,7 @@
Imports System.Xml
Imports DD_LIB_Standards
Imports DevExpress.LookAndFeel
Imports DigitalData.Modules.Logging
Module ModuleMySettings
Public PATH_FileExclusions As String = Path.Combine(Application.UserAppDataPath(), "FileExclusions.xml")
@@ -10,7 +11,7 @@ Module ModuleMySettings
Public MyConnectionString As String = ""
Public MyFormsDesign As String = ""
Public LogErrorsOnly As Boolean = True
Public DEBUG As Boolean = False
Public Sett_TaskOverviewKeepInFront As Boolean = True
Public Task_Popup_minutes As Integer = 2
Public Sett_ConstructorStart As Integer
@@ -51,7 +52,8 @@ Module ModuleMySettings
'Public USER_CLIENTS_COMMA_SEPERATED As String
Public FWSCAN_started As Boolean = False
Public LOGCONFIG As LogConfig
Public LOGGER As Logger
Dim rowresult As String = ""
Public Function LoadFileExclusion()
@@ -112,10 +114,10 @@ Module ModuleMySettings
Dim DT As DataTable
'if file doesn't exist, create the file with its default xml table
If Not File.Exists(ConfigPath) Then
ClassLogger.Add(">> ConfigFile was created in: " & ConfigPath, False)
LOGGER.Info("ConfigFile was created in: " & ConfigPath)
DT = CreateConfigTable()
DT.WriteXml(ConfigPath)
ClassLogger.Add(">> Defaultvalues were saved.", False)
LOGGER.Info("Defaultvalues were saved.")
End If
DT = GetTablefromXML(ConfigPath)
If DT Is Nothing Then
@@ -141,7 +143,7 @@ Module ModuleMySettings
PWplainText = wrapper.DecryptData(csb.Password)
connstring = Row.Item("Value").ToString.Replace(csb.Password, PWplainText)
Catch ex As Exception
ClassLogger.Add("- the Password '" & csb.Password & "' could not be decrypted", False)
LOGGER.Warn("- the Password '" & csb.Password & "' could not be decrypted")
connstring = ""
End Try
@@ -170,7 +172,7 @@ Module ModuleMySettings
PWplainText = wrapper.DecryptData(csb.Password)
connstring = Row.Item("Value").ToString.Replace(csb.Password, PWplainText)
Catch ex As Exception
ClassLogger.Add("- the Password '" & csb.Password & "' could not be decrypted", False)
LOGGER.Warn("- the Password '" & csb.Password & "' could not be decrypted")
connstring = ""
End Try
@@ -186,8 +188,8 @@ Module ModuleMySettings
Case "MyLinkedServer"
ClassProxy.MyLinkedServer = Row.Item("Value")
Case "LogErrorsOnly"
LogErrorsOnly = CBool(Row.Item("Value"))
clsCURRENT.LOG_ERRORS_ONLY = LogErrorsOnly
DEBUG = CBool(Row.Item("Value"))
clsCURRENT.LOG_ERRORS_ONLY = DEBUG
Case "Sett_TaskOverviewKeepInFront"
Sett_TaskOverviewKeepInFront = CBool(Row.Item("Value"))
Case "WD_IndexDeleteDocs"
@@ -287,7 +289,7 @@ Module ModuleMySettings
Catch ex As Exception
MsgBox("Error in LoadMyConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
ClassLogger.Add("Error in LoadMyConfig: " & ex.Message, True)
LOGGER.Warn("Error in LoadMyConfig: " & ex.Message, True)
Return False
End Try
Return True
@@ -300,8 +302,8 @@ Module ModuleMySettings
Return DS.Tables(0)
Catch ex As Exception
MsgBox("Error in GetTablefromXML" & vbNewLine & ex.Message & vbNewLine & "ConfigPath: " & vbNewLine & path, MsgBoxStyle.Critical)
ClassLogger.Add("Error in GetTablefromXML: " & ex.Message, True)
ClassLogger.Add(">> ConfigPath: " & ConfigPath, False)
LOGGER.Warn("Error in GetTablefromXML: " & ex.Message, True)
LOGGER.Warn("ConfigPath: " & ConfigPath)
Return Nothing
End Try
@@ -385,7 +387,7 @@ Module ModuleMySettings
table.AcceptChanges()
ClassLogger.Add(">> CreateConfigTable su...", False)
LOGGER.Info("CreateConfigTable su...")
Return table
Catch ex As Exception
MsgBox("Error in CreateConfigTable" & vbNewLine & ex.Message, MsgBoxStyle.Critical)