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());