<PackageReference Include="Serilog" Version="4.3.2-dev-02418" />

Serilog.Core.Logger

The core Serilog logging pipeline. A Logger must be disposed to flush any events buffered within it. Most application code should depend on ILogger, not this class.
namespace Serilog.Core { public sealed class Logger : ILogger, ILogEventSink, IDisposable, IAsyncDisposable { public static ILogger None { get; } public ILogger ForContext(ILogEventEnricher enricher); public ILogger ForContext(IEnumerable<ILogEventEnricher> enrichers); public ILogger ForContext(string propertyName, object value, bool destructureObjects = false); public ILogger ForContext(Type source); public ILogger ForContext<[Nullable(2)] TSource>(); public void Write(LogEventLevel level, string messageTemplate); public void Write<[Nullable(2)] T>(LogEventLevel level, string messageTemplate, T propertyValue); public void Write<[Nullable(2)] T0, [Nullable(2)] T1>(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Write<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(LogEventLevel level, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Write(LogEventLevel level, string messageTemplate, params object[] propertyValues); public bool IsEnabled(LogEventLevel level); public void Write(LogEventLevel level, Exception exception, string messageTemplate); public void Write<[Nullable(2)] T>(LogEventLevel level, Exception exception, string messageTemplate, T propertyValue); public void Write<[Nullable(2)] T0, [Nullable(2)] T1>(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Write<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(LogEventLevel level, Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Write(LogEventLevel level, Exception exception, string messageTemplate, params object[] propertyValues); public void Write(LogEvent logEvent); public void Verbose(string messageTemplate); public void Verbose<[Nullable(2)] T>(string messageTemplate, T propertyValue); public void Verbose<[Nullable(2)] T0, [Nullable(2)] T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Verbose<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Verbose(string messageTemplate, params object[] propertyValues); public void Verbose(Exception exception, string messageTemplate); public void Verbose<[Nullable(2)] T>(Exception exception, string messageTemplate, T propertyValue); public void Verbose<[Nullable(2)] T0, [Nullable(2)] T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Verbose<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Verbose(Exception exception, string messageTemplate, params object[] propertyValues); public void Debug(string messageTemplate); public void Debug<[Nullable(2)] T>(string messageTemplate, T propertyValue); public void Debug<[Nullable(2)] T0, [Nullable(2)] T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Debug<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Debug(string messageTemplate, params object[] propertyValues); public void Debug(Exception exception, string messageTemplate); public void Debug<[Nullable(2)] T>(Exception exception, string messageTemplate, T propertyValue); public void Debug<[Nullable(2)] T0, [Nullable(2)] T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Debug<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Debug(Exception exception, string messageTemplate, params object[] propertyValues); public void Information(string messageTemplate); public void Information<[Nullable(2)] T>(string messageTemplate, T propertyValue); public void Information<[Nullable(2)] T0, [Nullable(2)] T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Information<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Information(string messageTemplate, params object[] propertyValues); public void Information(Exception exception, string messageTemplate); public void Information<[Nullable(2)] T>(Exception exception, string messageTemplate, T propertyValue); public void Information<[Nullable(2)] T0, [Nullable(2)] T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Information<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Information(Exception exception, string messageTemplate, params object[] propertyValues); public void Warning(string messageTemplate); public void Warning<[Nullable(2)] T>(string messageTemplate, T propertyValue); public void Warning<[Nullable(2)] T0, [Nullable(2)] T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Warning<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Warning(string messageTemplate, params object[] propertyValues); public void Warning(Exception exception, string messageTemplate); public void Warning<[Nullable(2)] T>(Exception exception, string messageTemplate, T propertyValue); public void Warning<[Nullable(2)] T0, [Nullable(2)] T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Warning<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Warning(Exception exception, string messageTemplate, params object[] propertyValues); public void Error(string messageTemplate); public void Error<[Nullable(2)] T>(string messageTemplate, T propertyValue); public void Error<[Nullable(2)] T0, [Nullable(2)] T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Error<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Error(string messageTemplate, params object[] propertyValues); public void Error(Exception exception, string messageTemplate); public void Error<[Nullable(2)] T>(Exception exception, string messageTemplate, T propertyValue); public void Error<[Nullable(2)] T0, [Nullable(2)] T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Error<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Error(Exception exception, string messageTemplate, params object[] propertyValues); public void Fatal(string messageTemplate); public void Fatal<[Nullable(2)] T>(string messageTemplate, T propertyValue); public void Fatal<[Nullable(2)] T0, [Nullable(2)] T1>(string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Fatal<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Fatal(string messageTemplate, params object[] propertyValues); public void Fatal(Exception exception, string messageTemplate); public void Fatal<[Nullable(2)] T>(Exception exception, string messageTemplate, T propertyValue); public void Fatal<[Nullable(2)] T0, [Nullable(2)] T1>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1); public void Fatal<[Nullable(2)] T0, [Nullable(2)] T1, [Nullable(2)] T2>(Exception exception, string messageTemplate, T0 propertyValue0, T1 propertyValue1, T2 propertyValue2); public void Fatal(Exception exception, string messageTemplate, params object[] propertyValues); public bool BindMessageTemplate(string messageTemplate, object[] propertyValues, out MessageTemplate parsedTemplate, out IEnumerable<LogEventProperty> boundProperties); public bool BindProperty(string propertyName, object value, bool destructureObjects, out LogEventProperty property); public void Dispose(); public ValueTask DisposeAsync(); } }