public void Info(LogWriterOutputProvider messageProvider) { if (!IsInfoEnabled) return; logger.Info(MessageAsString(messageProvider())); }
public void Info(LogWriterOutputProvider messageProvider) { if (!IsInfoEnabled) return; _log.Info(messageProvider()); }
static LogMessageGenerator ToGenerator(LogWriterOutputProvider provider) { return(() => { object obj = provider?.Invoke(); return obj?.ToString() ?? ""; }); }
public void Debug(LogWriterOutputProvider messageProvider) { if (!IsDebugEnabled) return; _log.Debug(messageProvider()); }
public void Debug(LogWriterOutputProvider messageProvider) { if (!IsDebugEnabled) return; logger.Debug(MessageAsString(messageProvider())); }
public void Warn(LogWriterOutputProvider messageProvider) { if (!IsWarnEnabled) { return; } _log.Warn(messageProvider()); }
public void Debug(LogWriterOutputProvider messageProvider) { if (!IsDebugEnabled) { return; } _log.Debug(messageProvider()); }
public void Fatal(LogWriterOutputProvider messageProvider) { if (!IsFatalEnabled) { return; } WriteToElmah(ElmahLogLevelsEnum.Fatal, messageProvider); }
public void Info(LogWriterOutputProvider messageProvider) { if (!IsInfoEnabled) { return; } _log.Info(messageProvider()); }
public void Fatal(LogWriterOutputProvider messageProvider) { if (!IsFatalEnabled) { return; } _log.Fatal(messageProvider()); }
public void Warn(LogWriterOutputProvider messageProvider) { if (!IsWarnEnabled) { return; } WriteToElmah(ElmahLogLevelsEnum.Warn, messageProvider); }
public void Info(LogWriterOutputProvider messageProvider) { if (!IsInfoEnabled) { return; } WriteToElmah(ElmahLogLevelsEnum.Info, messageProvider); }
public void Error(LogWriterOutputProvider messageProvider) { if (!IsErrorEnabled) { return; } _log.Error(messageProvider()); }
public void Error(LogWriterOutputProvider messageProvider) { if (!IsErrorEnabled) { return; } WriteToElmah(ElmahLogLevelsEnum.Error, messageProvider); }
public void Debug(LogWriterOutputProvider messageProvider) { if (!IsDebugEnabled) { return; } WriteToElmah(ElmahLogLevelsEnum.Debug, messageProvider); }
LogMessageGenerator ToGenerator(LogWriterOutputProvider provider) { return(() => { object obj = provider(); return obj == null ? "" : obj.ToString(); }); }
public void Warn(LogWriterOutputProvider messageProvider) { if (!IsWarnEnabled) { return; } object obj = messageProvider(); LogInternal(LoggingLevel.Warn, obj, null); }
/// <summary> /// Fatals the specified message provider. /// </summary> /// <param name="messageProvider">The message provider.</param> public void Fatal(LogWriterOutputProvider messageProvider) { if (this.IsFatalEnabled) { System.Diagnostics.Debug.Assert(messageProvider != null, nameof(messageProvider) + " is null."); #pragma warning disable CC0031 // Check for null before calling a delegate var @object = messageProvider(); #pragma warning restore CC0031 // Check for null before calling a delegate this.Fatal(@object); } }
public void Debug(LogWriterOutputProvider messageProvider) { if (!IsDebugEnabled) { return; } object obj = messageProvider(); LogInternal(LoggingLevel.Debug, obj, null); }
public void Log(LoggingLevel level, LogWriterOutputProvider messageProvider) { if (_level < level) { return; } object obj = messageProvider(); LogInternal(level, obj, null); }
public void Fatal(LogWriterOutputProvider messageProvider) { if (!IsFatalEnabled) { return; } object obj = messageProvider(); LogInternal(LoggingLevel.Fatal, obj, null); }
public void Error(LogWriterOutputProvider messageProvider) { if (!IsErrorEnabled) { return; } object obj = messageProvider(); LogInternal(LoggingLevel.Error, obj, null); }
public void Info(LogWriterOutputProvider messageProvider) { if (!IsInfoEnabled) { return; } object obj = messageProvider(); LogInternal(LoggingLevel.Info, obj, null); }
/// <summary> /// Logs the specified level. /// </summary> /// <param name="level">The level.</param> /// <param name="messageProvider">The message provider.</param> public void Log(LoggingLevel level, LogWriterOutputProvider messageProvider) { if (this.logger.IsEnabled(ToLogLevel(level))) { System.Diagnostics.Debug.Assert(messageProvider != null, nameof(messageProvider) + " is null."); #pragma warning disable CC0031 // Check for null before calling a delegate var @object = messageProvider(); #pragma warning restore CC0031 // Check for null before calling a delegate this.Log(level, @object); } }
public void Log(LoggingLevel level, LogWriterOutputProvider messageProvider) { if (level == LoggingLevel.Fatal) Fatal(messageProvider); else if (level == LoggingLevel.Error) Error(messageProvider); else if (level == LoggingLevel.Warn) Warn(messageProvider); else if (level == LoggingLevel.Info) Info(messageProvider); else if (level >= LoggingLevel.Debug) Debug(messageProvider); }
public void Log(LoggingLevel level, LogWriterOutputProvider messageProvider) { if (level == LoggingLevel.Fatal) { Fatal(messageProvider); } else if (level == LoggingLevel.Error) { Error(messageProvider); } else if (level == LoggingLevel.Warn) { Warn(messageProvider); } else if (level == LoggingLevel.Info) { Info(messageProvider); } else if (level >= LoggingLevel.Debug) { Debug(messageProvider); } }
public void Warn(LogWriterOutputProvider messageProvider) { GetLogger().Warn(messageProvider()); }
public void Log(LoggingLevel level, LogWriterOutputProvider messageProvider) { _logger.Write(TopshelfToSerilogLevel(level), ObjectMessageTemplate, new MessageProvider(messageProvider)); }
static LogMessageGenerator ToGenerator(LogWriterOutputProvider provider) { return () => { object obj = provider?.Invoke(); return obj?.ToString() ?? ""; }; }
public void Log(LoggingLevel level, LogWriterOutputProvider messageProvider) { _log.Log(GetNLogLevel(level), ToGenerator(messageProvider)); }
public void Fatal(LogWriterOutputProvider messageProvider) { _log.Fatal(ToGenerator(messageProvider)); }
public void Debug(LogWriterOutputProvider messageProvider) { _logger.Debug(ObjectMessageTemplate, new MessageProvider(messageProvider)); }
public void Fatal(LogWriterOutputProvider messageProvider) { _logger.Fatal(ObjectMessageTemplate, new MessageProvider(messageProvider)); }
public void Fatal(LogWriterOutputProvider messageProvider) { if (!IsFatalEnabled) return; log.Fatal(messageProvider().ToString()); }
private void WriteToElmah(ElmahLogLevelsEnum logLevel, LogWriterOutputProvider messageProvider) { WriteToElmah(logLevel, messageProvider().ToString()); }
public void Warn(LogWriterOutputProvider messageProvider) { if (!IsWarnEnabled) return; log.Warn(messageProvider().ToString()); }
public void Debug(LogWriterOutputProvider messageProvider) { // no-op }
public void Fatal(LogWriterOutputProvider messageProvider) { Error(messageProvider()); }
public void Log(LoggingLevel level, LogWriterOutputProvider messageProvider) { // no-op }
public void Warn(LogWriterOutputProvider messageProvider) { _logger.Warning(ObjectMessageTemplate, new MessageProvider(messageProvider)); }
public void Error(LogWriterOutputProvider messageProvider) { _logger.Error(ObjectMessageTemplate, new MessageProvider(messageProvider)); }
public void Error(LogWriterOutputProvider messageProvider) { if (!IsErrorEnabled) return; log.Error(messageProvider().ToString()); }
public void Log(LoggingLevel level, LogWriterOutputProvider messageProvider) { _logger.Write(TopshelfToSerilogLevel(level), ObjectMessageTemplate, new MessageProvider(messageProvider)); }
public void Warn(LogWriterOutputProvider messageProvider) { _log.Warn(ToGenerator(messageProvider)); }
public void Error(LogWriterOutputProvider messageProvider) { _log.Error(ToGenerator(messageProvider)); }
public void Error(LogWriterOutputProvider messageProvider) { _log.Error(ToGenerator(messageProvider)); }
public void Info(LogWriterOutputProvider messageProvider) { _log.Info(ToGenerator(messageProvider)); }
public void Fatal(LogWriterOutputProvider messageProvider) { _log.Fatal(ToGenerator(messageProvider)); }
public void Warn(LogWriterOutputProvider messageProvider) { _log.Warn(ToGenerator(messageProvider)); }
public void Debug(LogWriterOutputProvider messageProvider) { _logger.Debug(ObjectMessageTemplate, new MessageProvider(messageProvider)); }
public void Debug(LogWriterOutputProvider messageProvider) { _log.Debug(ToGenerator(messageProvider)); }
public void Log(LoggingLevel level, LogWriterOutputProvider messageProvider) { _log.Log(GetNLogLevel(level), ToGenerator(messageProvider)); }
public void Info(LogWriterOutputProvider messageProvider) { _logger.Information(ObjectMessageTemplate, new MessageProvider(messageProvider)); }
public void Warn(LogWriterOutputProvider messageProvider) { // no-op }
public void Error(LogWriterOutputProvider messageProvider) { GetLogger().Error(messageProvider()); }
public void Info(LogWriterOutputProvider messageProvider) { GetLogger().Info(messageProvider()); }
public void Debug(LogWriterOutputProvider messageProvider) { _log.Debug(ToGenerator(messageProvider)); }
public void Fatal(LogWriterOutputProvider messageProvider) { GetLogger().Fatal(messageProvider()); }
public void Info(LogWriterOutputProvider messageProvider) { _log.Info(ToGenerator(messageProvider)); }
public void Debug(LogWriterOutputProvider messageProvider) { GetLogger().Debug(messageProvider()); }