Microsoft.Extensions.Logging.ConsoleLoggerExtensions
Provides extension methods for the ILoggingBuilder and ILoggerProviderConfiguration<T> classes.
Adds a console logger named 'Console' to the factory.
public static ILoggingBuilder AddConsole(this ILoggingBuilder builder, Action<ConsoleLoggerOptions> configure)
Adds a console logger named 'Console' to the factory.
This method is retained only for compatibility.
public static ILoggerFactory AddConsole(this ILoggerFactory factory, IConsoleLoggerSettings settings)
This method is retained only for compatibility.
public static ILoggerFactory AddConsole(this ILoggerFactory factory, LogLevel minLevel, bool includeScopes)
This method is retained only for compatibility.
This method is retained only for compatibility.
This method is retained only for compatibility.
public static ILoggerFactory AddConsole(this ILoggerFactory factory, Func<string, LogLevel, bool> filter, bool includeScopes)
This method is retained only for compatibility.
public static ILoggerFactory AddConsole(this ILoggerFactory factory, Func<string, LogLevel, bool> filter)
This method is retained only for compatibility.
This method is retained only for compatibility.
public static ILoggingBuilder AddConsoleFormatter<TFormatter, TOptions>(this ILoggingBuilder builder) where TFormatter : ConsoleFormatter where TOptions : ConsoleFormatterOptions
Adds a custom console logger formatter 'TFormatter' to be configured with options 'TOptions'.
public static ILoggingBuilder AddConsoleFormatter<TFormatter, TOptions>(this ILoggingBuilder builder, Action<TOptions> configure) where TFormatter : ConsoleFormatter where TOptions : ConsoleFormatterOptions
Adds a custom console logger formatter 'TFormatter' to be configured with options 'TOptions'.
Add a console log formatter named 'json' to the factory with default properties.
public static ILoggingBuilder AddJsonConsole(this ILoggingBuilder builder, Action<JsonConsoleFormatterOptions> configure)
Add and configure a console log formatter named 'json' to the factory.
Add the default console log formatter named 'simple' to the factory with default properties.
public static ILoggingBuilder AddSimpleConsole(this ILoggingBuilder builder, Action<SimpleConsoleFormatterOptions> configure)
Add and configure a console log formatter named 'simple' to the factory.
public static ILoggingBuilder AddSystemdConsole(this ILoggingBuilder builder, Action<ConsoleFormatterOptions> configure)
Add and configure a console log formatter named 'systemd' to the factory.
Add a console log formatter named 'systemd' to the factory with default properties.