From b28084bf1982d395fc10ab9118bf0ac4a0ab31c1 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 25 Feb 2026 13:37:00 +0100 Subject: [PATCH] Replace Info logging with LogInformation Renamed all usages of the Info logging method to LogInformation across the codebase, including in the Logger class. This aligns logging with standard conventions and improves consistency with common logging frameworks. --- .../Jobs/FinalizeDocumentJob.cs | 16 ++++++++-------- .../Jobs/Infrastructure/Logging.cs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/EnvelopeGenerator.ServiceHost/Jobs/FinalizeDocumentJob.cs b/EnvelopeGenerator.ServiceHost/Jobs/FinalizeDocumentJob.cs index 674e018f..8e731b77 100644 --- a/EnvelopeGenerator.ServiceHost/Jobs/FinalizeDocumentJob.cs +++ b/EnvelopeGenerator.ServiceHost/Jobs/FinalizeDocumentJob.cs @@ -105,7 +105,7 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration if (envelopeIds.Count > 0) { - _logger.Info("Found [{0}] completed envelopes.", envelopeIds.Count); + _logger.LogInformation("Found [{0}] completed envelopes.", envelopeIds.Count); } var total = envelopeIds.Count; @@ -113,7 +113,7 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration foreach (var id in envelopeIds) { - _logger.Info("Finalizing Envelope [{0}] ({1}/{2})", id, current, total); + _logger.LogInformation("Finalizing Envelope [{0}] ({1}/{2})", id, current, total); try { var envelope = _envelopeModel?.GetById(id); @@ -164,7 +164,7 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration var outputFilePath = Path.Combine(outputDirectoryPath, $"{envelope.Uuid}.pdf"); _logger.LogDebug("Writing finalized Pdf to disk.."); - _logger.Info("Output path is [{0}]", outputFilePath); + _logger.LogInformation("Output path is [{0}]", outputFilePath); try { @@ -184,7 +184,7 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration throw new ApplicationException("Final emails could not be sent!"); } - _logger.Info("Report-mails successfully sent!"); + _logger.LogInformation("Report-mails successfully sent!"); _logger.LogDebug("Setting envelope status.."); if (_actionService?.FinalizeEnvelope(envelope) == false) @@ -200,7 +200,7 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration } current += 1; - _logger.Info("Envelope [{0}] finalized!", id); + _logger.LogInformation("Envelope [{0}] finalized!", id); } _logger.LogDebug("Completed job {0} successfully!", jobId); @@ -326,13 +326,13 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration { var envelopeId = envelopeData.EnvelopeId; - _logger?.Info("Burning [{0}] signatures", envelopeData.AnnotationData.Count); + _logger?.LogInformation("Burning [{0}] signatures", envelopeData.AnnotationData.Count); var annotations = envelopeData.AnnotationData; var inputPath = string.Empty; if (envelopeData.DocAsByte is null) { inputPath = envelopeData.DocumentPath; - _logger?.Info("Input path: [{0}]", inputPath); + _logger?.LogInformation("Input path: [{0}]", inputPath); } else { @@ -352,7 +352,7 @@ public class FinalizeDocumentJob(IOptions options, IConfiguration _parentFolderUid = envelopeData.EnvelopeUuid; } - _logger?.Info("ParentFolderUID: [{0}]", _parentFolderUid); + _logger?.LogInformation("ParentFolderUID: [{0}]", _parentFolderUid); byte[] inputDocumentBuffer; if (envelopeData.DocAsByte is not null) { diff --git a/EnvelopeGenerator.ServiceHost/Jobs/Infrastructure/Logging.cs b/EnvelopeGenerator.ServiceHost/Jobs/Infrastructure/Logging.cs index f474d7f4..c791869b 100644 --- a/EnvelopeGenerator.ServiceHost/Jobs/Infrastructure/Logging.cs +++ b/EnvelopeGenerator.ServiceHost/Jobs/Infrastructure/Logging.cs @@ -14,7 +14,7 @@ public class Logger ILogger logger; public void LogDebug(string message, params object?[] args) => Write("DEBUG", message, args); - public void Info(string message, params object?[] args) => Write("INFO", message, args); + public void LogInformation(string message, params object?[] args) => Write("INFO", message, args); public void Warn(string message, params object?[] args) => Write("WARN", message, args); public void Warn(Exception exception, string message, params object?[] args) => Write("WARN", message + " " + exception.Message, args); public void Error(Exception exception) => Write("ERROR", exception.Message, Array.Empty());