<PackageReference Include="Serilog" Version="4.4.0-dev-02438" />

Serilog.Log

public static class Log
An optional static entry point for logging that can be easily referenced by different parts of an application. To configure the Log set the Logger static property to a logger instance.
public static ILogger Logger { get; set; }

The globally-shared logger.

public static bool BindMessageTemplate(string messageTemplate, object[] propertyValues, out MessageTemplate parsedTemplate, out IEnumerable boundProperties)

Uses configured scalar conversion and destructuring rules to bind a set of properties to a message template. Returns false if the template or values are invalid (
ILogger
methods never throw exceptions).

public static bool BindProperty(string propertyName, object value, bool destructureObjects, out LogEventProperty property)

Uses configured scalar conversion and destructuring rules to bind a property value to its captured representation.

public static void CloseAndFlush()

Resets Logger to the default and disposes the original if possible

public static void Debug(string messageTemplate)

Write a log event with the Debug level.

public static void Debug<T>(string messageTemplate, T propertyValue)

Write a log event with the Debug level.

public static void Debug<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Debug level.

public static void Debug<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Debug level.

public static void Debug(string messageTemplate, object[] propertyValues)

Write a log event with the Debug level.

public static void Debug(Exception exception, string messageTemplate)

Write a log event with the Debug level and associated exception.

public static void Debug<T>(Exception exception, string messageTemplate, T propertyValue)

Write a log event with the Debug level and associated exception.

public static void Debug<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Debug level and associated exception.

public static void Debug<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Debug level and associated exception.

public static void Debug(Exception exception, string messageTemplate, object[] propertyValues)

Write a log event with the Debug level and associated exception.

public static void Error(string messageTemplate)

Write a log event with the Error level.

public static void Error<T>(string messageTemplate, T propertyValue)

Write a log event with the Error level.

public static void Error<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Error level.

public static void Error<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Error level.

public static void Error(string messageTemplate, object[] propertyValues)

Write a log event with the Error level.

public static void Error(Exception exception, string messageTemplate)

Write a log event with the Error level and associated exception.

public static void Error<T>(Exception exception, string messageTemplate, T propertyValue)

Write a log event with the Error level and associated exception.

public static void Error<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Error level and associated exception.

public static void Error<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Error level and associated exception.

public static void Error(Exception exception, string messageTemplate, object[] propertyValues)

Write a log event with the Error level and associated exception.

public static void Fatal(string messageTemplate)

Write a log event with the Fatal level.

public static void Fatal<T>(string messageTemplate, T propertyValue)

Write a log event with the Fatal level.

public static void Fatal<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Fatal level.

public static void Fatal<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Fatal level.

public static void Fatal(string messageTemplate, object[] propertyValues)

Write a log event with the Fatal level.

public static void Fatal(Exception exception, string messageTemplate)

Write a log event with the Fatal level and associated exception.

public static void Fatal<T>(Exception exception, string messageTemplate, T propertyValue)

Write a log event with the Fatal level and associated exception.

public static void Fatal<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Fatal level and associated exception.

public static void Fatal<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Fatal level and associated exception.

public static void Fatal(Exception exception, string messageTemplate, object[] propertyValues)

Write a log event with the Fatal level and associated exception.

public static ILogger ForContext(ILogEventEnricher enricher)

Create a logger that enriches log events via the provided enrichers.

public static ILogger ForContext(ILogEventEnricher[] enrichers)

Create a logger that enriches log events via the provided enrichers.

public static ILogger ForContext(string propertyName, object value, bool destructureObjects = false)

Create a logger that enriches log events with the specified property.

public static ILogger ForContext<TSource>()

Create a logger that marks log events as being from the specified source type.

public static ILogger ForContext(Type source)

Create a logger that marks log events as being from the specified source type.

public static void Information(string messageTemplate)

Write a log event with the Information level.

public static void Information<T>(string messageTemplate, T propertyValue)

Write a log event with the Information level.

public static void Information<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Information level.

public static void Information<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Information level.

public static void Information(string messageTemplate, object[] propertyValues)

Write a log event with the Information level.

public static void Information(Exception exception, string messageTemplate)

Write a log event with the Information level and associated exception.

public static void Information<T>(Exception exception, string messageTemplate, T propertyValue)

Write a log event with the Information level and associated exception.

public static void Information<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Information level and associated exception.

public static void Information<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Information level and associated exception.

public static void Information(Exception exception, string messageTemplate, object[] propertyValues)

Write a log event with the Information level and associated exception.

public static bool IsEnabled(LogEventLevel level)

Determine if events at the specified level will be passed through to the log sinks.

public static void Verbose(string messageTemplate)

Write a log event with the Verbose level.

public static void Verbose<T>(string messageTemplate, T propertyValue)

Write a log event with the Verbose level.

public static void Verbose<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Verbose level.

public static void Verbose<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Verbose level.

public static void Verbose(string messageTemplate, object[] propertyValues)

Write a log event with the Verbose level.

public static void Verbose(Exception exception, string messageTemplate)

Write a log event with the Verbose level and associated exception.

public static void Verbose<T>(Exception exception, string messageTemplate, T propertyValue)

Write a log event with the Verbose level and associated exception.

public static void Verbose<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Verbose level and associated exception.

public static void Verbose<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Verbose level and associated exception.

public static void Verbose(Exception exception, string messageTemplate, object[] propertyValues)

Write a log event with the Verbose level and associated exception.

public static void Warning(string messageTemplate)

Write a log event with the Warning level.

public static void Warning<T>(string messageTemplate, T propertyValue)

Write a log event with the Warning level.

public static void Warning<T0, T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Warning level.

public static void Warning<T0, T1, T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Warning level.

public static void Warning(string messageTemplate, object[] propertyValues)

Write a log event with the Warning level.

public static void Warning(Exception exception, string messageTemplate)

Write a log event with the Warning level and associated exception.

public static void Warning<T>(Exception exception, string messageTemplate, T propertyValue)

Write a log event with the Warning level and associated exception.

public static void Warning<T0, T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the Warning level and associated exception.

public static void Warning<T0, T1, T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the Warning level and associated exception.

public static void Warning(Exception exception, string messageTemplate, object[] propertyValues)

Write a log event with the Warning level and associated exception.

public static void Write(LogEvent logEvent)

Write an event to the log.

public static void Write(LogEventLevel level, string messageTemplate)

Write a log event with the specified level.

public static void Write<T>(LogEventLevel level, string messageTemplate, T propertyValue)

Write a log event with the specified level.

public static void Write<T0, T1>(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the specified level.

public static void Write<T0, T1, T2>(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the specified level.

public static void Write(LogEventLevel level, string messageTemplate, object[] propertyValues)

Write a log event with the specified level.

public static void Write(LogEventLevel level, Exception exception, string messageTemplate)

Write a log event with the specified level and associated exception.

public static void Write<T>(LogEventLevel level, Exception exception, string messageTemplate, T propertyValue)

Write a log event with the specified level and associated exception.

public static void Write<T0, T1>(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1)

Write a log event with the specified level and associated exception.

public static void Write<T0, T1, T2>(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2)

Write a log event with the specified level and associated exception.

public static void Write(LogEventLevel level, Exception exception, string messageTemplate, object[] propertyValues)

Write a log event with the specified level and associated exception.