Verbesserung der Protokollierung und Konfigurationsbereinigung
Die Änderungen umfassen: - Anpassung der `App.config`: Entfernen veralteter Einstellungen (`FB_DATABASE`, `FB_USER`, etc.) und Hinzufügen neuer Platzhalter (`Test`). - Verbesserte Fehlerbehandlung und Protokollierung in `Form1.vb`, `WindowsService.vb` und anderen Klassen. - Konsistente Verwendung von Symbolen (✔, ⚠) zur Hervorhebung von Erfolgen und Warnungen. - Aktualisierung der `Settings.settings` und Bereinigung nicht mehr benötigter Konfigurationswerte. - Downgrade von `Microsoft.Data.SqlClient` von Version 7.0.1 auf 5.2.2. - Entfernung redundanter Module und Codeabschnitte zur Verbesserung der Wartbarkeit. - Verbesserte Fehlerbehandlung beim Starten und Stoppen des ServiceHosts. - Optimierung der Protokollmeldungen für Debugging und Performance-Analysen.
This commit is contained in:
@@ -97,22 +97,21 @@ Public Class DatatableJob
|
||||
oStopWatch.Stop()
|
||||
oLogger.Debug("[Time] Adding Relations: {0}ms", oStopWatch.ElapsedMilliseconds)
|
||||
|
||||
oLogger.Info("Fetched Datatable [{0}]", oDatatableName)
|
||||
oLogger.Info("✔ Fetched Datatable [{0}]", oDatatableName)
|
||||
oResult.Tables.Add(oResultTable)
|
||||
Catch ex As Exception
|
||||
oLogger.Warn("Execute: Error while saving Table: [{0}]", oDatatableName)
|
||||
oLogger.Warn("⚠ Error while saving Table: [{0}]", oDatatableName)
|
||||
oLogger.Error(ex)
|
||||
End Try
|
||||
Next
|
||||
|
||||
oLogger.Info("Fetched [{0}] Datatables", oResult.Tables.Count)
|
||||
|
||||
' Das Ergebnis speichern
|
||||
context.Result = oResult
|
||||
oLogger.Info("✔✔ Fetched [{0}] Datatables ✔✔", oResult.Tables.Count)
|
||||
|
||||
Catch ex As Exception
|
||||
oLogger.Error(ex)
|
||||
oLogger.Warn("Execute: Unhandled exception while executing SQL for Datatable {0}", oCronJobTitle)
|
||||
oLogger.Warn("⚠ Unhandled exception while executing SQL for Datatable {0}", oCronJobTitle)
|
||||
End Try
|
||||
|
||||
Return Task.FromResult(True)
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
Imports System.Threading
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Language
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports Quartz
|
||||
Imports Quartz.Listener
|
||||
|
||||
Imports System.Diagnostics
|
||||
Imports System.Data
|
||||
Public Class JobListener
|
||||
Inherits JobListenerSupport
|
||||
|
||||
@@ -121,7 +121,7 @@ Public Class JobListener
|
||||
End If
|
||||
End If
|
||||
|
||||
_Logger.Info("Dataset successfully updated with table [{0}]", oName)
|
||||
_Logger.Info("✔ Dataset successfully updated with table [{0}]", oName)
|
||||
|
||||
Finally
|
||||
' ✅ SCHRITT 3: Write-Lock freigeben (so schnell wie möglich!)
|
||||
@@ -129,7 +129,7 @@ Public Class JobListener
|
||||
oStopWatch.Stop()
|
||||
' ✅ Performance-Warning bei langsamen Updates
|
||||
If oStopWatch.ElapsedMilliseconds > 500 Then
|
||||
_Logger.Warn("[Performance] Table update took {0}ms (> 500ms threshold)", oStopWatch.ElapsedMilliseconds)
|
||||
_Logger.Warn("⚠ [Performance] Table update took {0}ms (> 500ms threshold)", oStopWatch.ElapsedMilliseconds)
|
||||
Else
|
||||
_Logger.Debug("[Performance] Table update completed in {0}ms", oStopWatch.ElapsedMilliseconds)
|
||||
End If
|
||||
@@ -142,7 +142,7 @@ Public Class JobListener
|
||||
_MSSQL.ExecuteNonQuery($"INSERT INTO TBAPPSERV_CRON_DETAIL_HISTORY (DETAIL_ID) VALUES ({oDetailId})")
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("Unexpected error in SaveDataTables: {0}", ex.Message)
|
||||
_Logger.Warn("⚠ Unexpected error in SaveDataTables: {0}", ex.Message)
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
@@ -256,23 +256,22 @@ Public Class JobListener
|
||||
|
||||
Catch ex As ArgumentNullException
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("ArgumentNullException in AddRelation: {0}", ex.Message)
|
||||
_Logger.Warn("⚠ ArgumentNullException in AddRelation: {0}", ex.Message)
|
||||
|
||||
Catch ex As DuplicateNameException
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("DuplicateNameException in AddRelation: {0}", ex.Message)
|
||||
_Logger.Warn("⚠ DuplicateNameException in AddRelation: {0}", ex.Message)
|
||||
|
||||
Catch ex As InvalidConstraintException
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("InvalidConstraintException in AddRelation: {0}", ex.Message)
|
||||
|
||||
_Logger.Warn("⚠ InvalidConstraintException in AddRelation: {0}", ex.Message)
|
||||
Catch ex As ArgumentException
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("ArgumentException in AddRelation: {0}", ex.Message)
|
||||
_Logger.Warn("⚠ ArgumentException in AddRelation: {0}", ex.Message)
|
||||
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
_Logger.Warn("Exception in AddRelation: {0}", ex.Message)
|
||||
_Logger.Warn("⚠ Exception in AddRelation: {0}", ex.Message)
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -103,12 +103,13 @@ Public Class Scheduler
|
||||
|
||||
Logger.Debug("Scheduled a new job for Cron Job [{0}]", oTitle)
|
||||
Next
|
||||
Logger.Info("✔ Scheduler started with {0} cron jobs", oCronjobs.Rows.Count)
|
||||
Else
|
||||
Logger.Warn("CronJobs could not be fetched!")
|
||||
Logger.Warn("⚠ CronJobs could not be fetched!")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Logger.Warn("Unexpected Error while setting up scheduler: " & ex.Message)
|
||||
Logger.Warn("⚠ Unexpected Error while setting up scheduler: " & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
Public Async Function GetCronJobs() As Task(Of DataTable)
|
||||
|
||||
Reference in New Issue
Block a user