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.
This commit is contained in:
@@ -105,7 +105,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
|
|||||||
|
|
||||||
if (envelopeIds.Count > 0)
|
if (envelopeIds.Count > 0)
|
||||||
{
|
{
|
||||||
_logger.Info("Found [{0}] completed envelopes.", envelopeIds.Count);
|
_logger.LogInformation("Found [{0}] completed envelopes.", envelopeIds.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
var total = envelopeIds.Count;
|
var total = envelopeIds.Count;
|
||||||
@@ -113,7 +113,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
|
|||||||
|
|
||||||
foreach (var id in envelopeIds)
|
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
|
try
|
||||||
{
|
{
|
||||||
var envelope = _envelopeModel?.GetById(id);
|
var envelope = _envelopeModel?.GetById(id);
|
||||||
@@ -164,7 +164,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
|
|||||||
|
|
||||||
var outputFilePath = Path.Combine(outputDirectoryPath, $"{envelope.Uuid}.pdf");
|
var outputFilePath = Path.Combine(outputDirectoryPath, $"{envelope.Uuid}.pdf");
|
||||||
_logger.LogDebug("Writing finalized Pdf to disk..");
|
_logger.LogDebug("Writing finalized Pdf to disk..");
|
||||||
_logger.Info("Output path is [{0}]", outputFilePath);
|
_logger.LogInformation("Output path is [{0}]", outputFilePath);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -184,7 +184,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
|
|||||||
throw new ApplicationException("Final emails could not be sent!");
|
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..");
|
_logger.LogDebug("Setting envelope status..");
|
||||||
if (_actionService?.FinalizeEnvelope(envelope) == false)
|
if (_actionService?.FinalizeEnvelope(envelope) == false)
|
||||||
@@ -200,7 +200,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
|
|||||||
}
|
}
|
||||||
|
|
||||||
current += 1;
|
current += 1;
|
||||||
_logger.Info("Envelope [{0}] finalized!", id);
|
_logger.LogInformation("Envelope [{0}] finalized!", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogDebug("Completed job {0} successfully!", jobId);
|
_logger.LogDebug("Completed job {0} successfully!", jobId);
|
||||||
@@ -326,13 +326,13 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
|
|||||||
{
|
{
|
||||||
var envelopeId = envelopeData.EnvelopeId;
|
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 annotations = envelopeData.AnnotationData;
|
||||||
var inputPath = string.Empty;
|
var inputPath = string.Empty;
|
||||||
if (envelopeData.DocAsByte is null)
|
if (envelopeData.DocAsByte is null)
|
||||||
{
|
{
|
||||||
inputPath = envelopeData.DocumentPath;
|
inputPath = envelopeData.DocumentPath;
|
||||||
_logger?.Info("Input path: [{0}]", inputPath);
|
_logger?.LogInformation("Input path: [{0}]", inputPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -352,7 +352,7 @@ public class FinalizeDocumentJob(IOptions<WorkerOptions> options, IConfiguration
|
|||||||
_parentFolderUid = envelopeData.EnvelopeUuid;
|
_parentFolderUid = envelopeData.EnvelopeUuid;
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger?.Info("ParentFolderUID: [{0}]", _parentFolderUid);
|
_logger?.LogInformation("ParentFolderUID: [{0}]", _parentFolderUid);
|
||||||
byte[] inputDocumentBuffer;
|
byte[] inputDocumentBuffer;
|
||||||
if (envelopeData.DocAsByte is not null)
|
if (envelopeData.DocAsByte is not null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class Logger
|
|||||||
ILogger<LogConfig> logger;
|
ILogger<LogConfig> logger;
|
||||||
|
|
||||||
public void LogDebug(string message, params object?[] args) => Write("DEBUG", message, args);
|
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(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 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<object?>());
|
public void Error(Exception exception) => Write("ERROR", exception.Message, Array.Empty<object?>());
|
||||||
|
|||||||
Reference in New Issue
Block a user