ConsoleLoggerExtensions.AddConsole ConsoleLoggerExtensions.AddConsole ConsoleLoggerExtensions.AddConsole ConsoleLoggerExtensions.AddConsole Method

Definition

Overloads

AddConsole(ILoggerFactory) AddConsole(ILoggerFactory) AddConsole(ILoggerFactory) AddConsole(ILoggerFactory)

Adds a console logger that is enabled for LogLevel.Information or higher.

AddConsole(ILoggingBuilder) AddConsole(ILoggingBuilder) AddConsole(ILoggingBuilder) AddConsole(ILoggingBuilder)

Adds a console logger named 'Console' to the factory.

AddConsole(ILoggerFactory, IConfiguration) AddConsole(ILoggerFactory, IConfiguration) AddConsole(ILoggerFactory, IConfiguration) AddConsole(ILoggerFactory, IConfiguration)
AddConsole(ILoggerFactory, IConsoleLoggerSettings) AddConsole(ILoggerFactory, IConsoleLoggerSettings) AddConsole(ILoggerFactory, IConsoleLoggerSettings) AddConsole(ILoggerFactory, IConsoleLoggerSettings)
AddConsole(ILoggerFactory, LogLevel) AddConsole(ILoggerFactory, LogLevel) AddConsole(ILoggerFactory, LogLevel) AddConsole(ILoggerFactory, LogLevel)

Adds a console logger that is enabled for LogLevels of minLevel or higher.

AddConsole(ILoggerFactory, Boolean) AddConsole(ILoggerFactory, Boolean) AddConsole(ILoggerFactory, Boolean) AddConsole(ILoggerFactory, Boolean)

Adds a console logger that is enabled for LogLevel.Information or higher.

AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>)

Adds a console logger that is enabled as defined by the filter function.

AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>) AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>) AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>) AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)

Adds a console logger named 'Console' to the factory.

AddConsole(ILoggerFactory, LogLevel, Boolean) AddConsole(ILoggerFactory, LogLevel, Boolean) AddConsole(ILoggerFactory, LogLevel, Boolean) AddConsole(ILoggerFactory, LogLevel, Boolean)

Adds a console logger that is enabled for LogLevels of minLevel or higher.

AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean)

Adds a console logger that is enabled as defined by the filter function.

AddConsole(ILoggerFactory) AddConsole(ILoggerFactory) AddConsole(ILoggerFactory) AddConsole(ILoggerFactory)

Warning

This API is now obsolete.

Adds a console logger that is enabled for LogLevel.Information or higher.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddConsole(Microsoft::Extensions::Logging::ILoggerFactory ^ factory);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory);
static member AddConsole : Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddConsole (factory As ILoggerFactory) As ILoggerFactory

Parameters

Returns

AddConsole(ILoggingBuilder) AddConsole(ILoggingBuilder) AddConsole(ILoggingBuilder) AddConsole(ILoggingBuilder)

Adds a console logger named 'Console' to the factory.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddConsole(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsole (this Microsoft.Extensions.Logging.ILoggingBuilder builder);
static member AddConsole : Microsoft.Extensions.Logging.ILoggingBuilder -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddConsole (builder As ILoggingBuilder) As ILoggingBuilder

Parameters

Returns

AddConsole(ILoggerFactory, IConfiguration) AddConsole(ILoggerFactory, IConfiguration) AddConsole(ILoggerFactory, IConfiguration) AddConsole(ILoggerFactory, IConfiguration)

Warning

This API is now obsolete.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddConsole(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Microsoft::Extensions::Configuration::IConfiguration ^ configuration);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Configuration.IConfiguration configuration);
static member AddConsole : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddConsole (factory As ILoggerFactory, configuration As IConfiguration) As ILoggerFactory

Parameters

Returns

AddConsole(ILoggerFactory, IConsoleLoggerSettings) AddConsole(ILoggerFactory, IConsoleLoggerSettings) AddConsole(ILoggerFactory, IConsoleLoggerSettings) AddConsole(ILoggerFactory, IConsoleLoggerSettings)

Warning

This API is now obsolete.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddConsole(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Microsoft::Extensions::Logging::Console::IConsoleLoggerSettings ^ settings);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.Console.IConsoleLoggerSettings settings);
static member AddConsole : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.Console.IConsoleLoggerSettings -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddConsole (factory As ILoggerFactory, settings As IConsoleLoggerSettings) As ILoggerFactory

Parameters

Returns

AddConsole(ILoggerFactory, LogLevel) AddConsole(ILoggerFactory, LogLevel) AddConsole(ILoggerFactory, LogLevel) AddConsole(ILoggerFactory, LogLevel)

Warning

This API is now obsolete.

Adds a console logger that is enabled for LogLevels of minLevel or higher.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddConsole(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Microsoft::Extensions::Logging::LogLevel minLevel);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.LogLevel minLevel);
static member AddConsole : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.LogLevel -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddConsole (factory As ILoggerFactory, minLevel As LogLevel) As ILoggerFactory

Parameters

minLevel
LogLevel LogLevel LogLevel LogLevel

The minimum LogLevel to be logged

Returns

AddConsole(ILoggerFactory, Boolean) AddConsole(ILoggerFactory, Boolean) AddConsole(ILoggerFactory, Boolean) AddConsole(ILoggerFactory, Boolean)

Warning

This API is now obsolete.

Adds a console logger that is enabled for LogLevel.Information or higher.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddConsole(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, bool includeScopes);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory, bool includeScopes);
static member AddConsole : Microsoft.Extensions.Logging.ILoggerFactory * bool -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddConsole (factory As ILoggerFactory, includeScopes As Boolean) As ILoggerFactory

Parameters

includeScopes
Boolean Boolean Boolean Boolean

A value which indicates whether log scope information should be displayed in the output.

Returns

AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>)

Warning

This API is now obsolete.

Adds a console logger that is enabled as defined by the filter function.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddConsole(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Func<System::String ^, Microsoft::Extensions::Logging::LogLevel, bool> ^ filter);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory, Func<string,Microsoft.Extensions.Logging.LogLevel,bool> filter);
static member AddConsole : Microsoft.Extensions.Logging.ILoggerFactory * Func<string, Microsoft.Extensions.Logging.LogLevel, bool> -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddConsole (factory As ILoggerFactory, filter As Func(Of String, LogLevel, Boolean)) As ILoggerFactory

Parameters

filter
Func<String,LogLevel,Boolean>

The category filter to apply to logs.

Returns

AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>) AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>) AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>) AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)

Adds a console logger named 'Console' to the factory.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddConsole(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Action<Microsoft::Extensions::Logging::Console::ConsoleLoggerOptions ^> ^ configure);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddConsole (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Action<Microsoft.Extensions.Logging.Console.ConsoleLoggerOptions> configure);
static member AddConsole : Microsoft.Extensions.Logging.ILoggingBuilder * Action<Microsoft.Extensions.Logging.Console.ConsoleLoggerOptions> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddConsole (builder As ILoggingBuilder, configure As Action(Of ConsoleLoggerOptions)) As ILoggingBuilder

Parameters

configure
Action<ConsoleLoggerOptions>

A delegate to configure the ConsoleLogger.

Returns

AddConsole(ILoggerFactory, LogLevel, Boolean) AddConsole(ILoggerFactory, LogLevel, Boolean) AddConsole(ILoggerFactory, LogLevel, Boolean) AddConsole(ILoggerFactory, LogLevel, Boolean)

Warning

This API is now obsolete.

Adds a console logger that is enabled for LogLevels of minLevel or higher.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddConsole(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Microsoft::Extensions::Logging::LogLevel minLevel, bool includeScopes);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.LogLevel minLevel, bool includeScopes);
static member AddConsole : Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Logging.LogLevel * bool -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddConsole (factory As ILoggerFactory, minLevel As LogLevel, includeScopes As Boolean) As ILoggerFactory

Parameters

minLevel
LogLevel LogLevel LogLevel LogLevel

The minimum LogLevel to be logged

includeScopes
Boolean Boolean Boolean Boolean

A value which indicates whether log scope information should be displayed in the output.

Returns

AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean) AddConsole(ILoggerFactory, Func<String,LogLevel,Boolean>, Boolean)

Warning

This API is now obsolete.

Adds a console logger that is enabled as defined by the filter function.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggerFactory ^ AddConsole(Microsoft::Extensions::Logging::ILoggerFactory ^ factory, Func<System::String ^, Microsoft::Extensions::Logging::LogLevel, bool> ^ filter, bool includeScopes);
[System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")]
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory, Func<string,Microsoft.Extensions.Logging.LogLevel,bool> filter, bool includeScopes);
static member AddConsole : Microsoft.Extensions.Logging.ILoggerFactory * Func<string, Microsoft.Extensions.Logging.LogLevel, bool> * bool -> Microsoft.Extensions.Logging.ILoggerFactory
<Extension()>
Public Function AddConsole (factory As ILoggerFactory, filter As Func(Of String, LogLevel, Boolean), includeScopes As Boolean) As ILoggerFactory

Parameters

filter
Func<String,LogLevel,Boolean>

The category filter to apply to logs.

includeScopes
Boolean Boolean Boolean Boolean

A value which indicates whether log scope information should be displayed in the output.

Returns

Applies to