public void Log(MT.LogLevel level, MT.LogOutputProvider messageProvider) { if (level == MT.LogLevel.Fatal) { Fatal(messageProvider); } else if (level == MT.LogLevel.Error) { Error(messageProvider); } else if (level == MT.LogLevel.Warn) { Warn(messageProvider); } else if (level == MT.LogLevel.Info) { Info(messageProvider); } else if (level >= MT.LogLevel.Debug) { Debug(messageProvider); } }
public void Error(MT.LogOutputProvider messageProvider) { _logger.Log(LogLevel.Error, 0, messageProvider, null, MessageFormatter); }
public void Debug(MT.LogOutputProvider messageProvider) { _logger.Log(LogLevel.Debug, 0, messageProvider, null, MessageFormatter); }
private static string MessageFormatter(MT.LogOutputProvider output, Exception error) { return(output == null ? null : output()?.ToString()); }
public void Warn(MT.LogOutputProvider messageProvider) { _logger.Log(LogLevel.Warning, 0, messageProvider, null, MessageFormatter); }
public void Info(MT.LogOutputProvider messageProvider) { _logger.Log(LogLevel.Information, 0, messageProvider, null, MessageFormatter); }
public void Fatal(MT.LogOutputProvider messageProvider) { _logger.Log(LogLevel.Critical, 0, messageProvider, null, MessageFormatter); }