Success and failure generated by the process will be logged in the dataverse if possible. If the connection to the dataverse is not established, the log will be sent to the server.
Creation of the object LoggerMessage
Code Block | ||
---|---|---|
| ||
public class LoggerMessage
{
private readonly ILogger<LoggerMessage> _logger;
public LoggerMessage(ILogger<LoggerMessage> logger)
{
_logger = logger;
}
public void LogMessage(string message)
{
_logger.LogInformation(message);
}
public void AppendText(ref string intial, string append)
{
intial = intial + "\n" + append;
}
} |