Rename Logger.Warn to Logger.LogWarning throughout codebase

Replaces all usages of Logger.Warn with Logger.LogWarning for consistency with .NET logging conventions. Updates the Logger class method name and all related calls, with no changes to logic or parameters.
This commit is contained in:
2026-02-25 13:37:50 +01:00
parent b28084bf19
commit 5230076d5d
3 changed files with 14 additions and 14 deletions

View File

@@ -119,7 +119,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
var envelope = _envelopeModel?.GetById(id);
if (envelope is null)
{
_logger.Warn("Envelope could not be loaded for Id [{0}]!", id);
_logger.LogWarning("Envelope could not be loaded for Id [{0}]!", id);
throw new ArgumentNullException(nameof(EnvelopeData));
}
@@ -128,7 +128,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
if (envelopeData is null)
{
_logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", id);
_logger.LogWarning("EnvelopeData could not be loaded for Id [{0}]!", id);
throw new ArgumentNullException(nameof(EnvelopeData));
}
@@ -136,13 +136,13 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
var burnedDocument = BurnAnnotationsToPdf(envelopeData);
if (burnedDocument is null)
{
_logger.Warn("Document could not be finalized!");
_logger.LogWarning("Document could not be finalized!");
throw new ApplicationException("Document could not be finalized");
}
if (_actionService?.CreateReport(envelope) == false)
{
_logger.Warn("Document Report could not be created!");
_logger.LogWarning("Document Report could not be created!");
throw new ApplicationException("Document Report could not be created");
}
@@ -172,7 +172,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
}
catch (Exception ex)
{
_logger.Warn("Could not export final document to disk!");
_logger.LogWarning("Could not export final document to disk!");
throw new ExportDocumentException("Could not export final document to disk!", ex);
}
@@ -189,7 +189,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
_logger.LogDebug("Setting envelope status..");
if (_actionService?.FinalizeEnvelope(envelope) == false)
{
_logger.Warn("Envelope could not be finalized!");
_logger.LogWarning("Envelope could not be finalized!");
throw new ApplicationException("Envelope could not be finalized");
}
}
@@ -207,17 +207,17 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
}
catch (MergeDocumentException ex)
{
_logger.Warn("Certificate Document job failed at step: Merging documents!");
_logger.LogWarning("Certificate Document job failed at step: Merging documents!");
_logger.Error(ex);
}
catch (ExportDocumentException ex)
{
_logger.Warn("Certificate Document job failed at step: Exporting document!");
_logger.LogWarning("Certificate Document job failed at step: Exporting document!");
_logger.Error(ex);
}
catch (Exception ex)
{
_logger.Warn("Certificate Document job failed!");
_logger.LogWarning("Certificate Document job failed!");
_logger.Error(ex);
}
finally
@@ -270,7 +270,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
}
else
{
_logger?.Warn("No SendFinalEmailToCreator - oMailToCreator [{0}] <> [{1}] ", mailToCreator, FinalEmailType.No);
_logger?.LogWarning("No SendFinalEmailToCreator - oMailToCreator [{0}] <> [{1}] ", mailToCreator, FinalEmailType.No);
}
if (mailToReceivers != FinalEmailType.No)
@@ -280,7 +280,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
}
else
{
_logger?.Warn("No SendFinalEmailToReceivers - oMailToCreator [{0}] <> [{1}] ", mailToReceivers, FinalEmailType.No);
_logger?.LogWarning("No SendFinalEmailToReceivers - oMailToCreator [{0}] <> [{1}] ", mailToReceivers, FinalEmailType.No);
}
return true;