ConsoleLoggerExtensions.AddConsole Method

Definition

Overloads

AddConsole(ILoggerFactory)
Obsolete.

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

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

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

AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)

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

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

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

AddConsole(ILoggerFactory, Boolean)
Obsolete.

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

AddConsole(ILoggerFactory, LogLevel, Boolean)
Obsolete.

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

AddConsole(ILoggerFactory, IConsoleLoggerSettings)
Obsolete.
AddConsole(ILoggerFactory, IConfiguration)
Obsolete.
AddConsole(ILoggingBuilder)

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

AddConsole(ILoggerFactory, LogLevel)
Obsolete.

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

AddConsole(ILoggerFactory)

Caution

This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).

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

Parameters

factory
ILoggerFactory

The ILoggerFactory to use.

Returns

ILoggerFactory
Attributes

Applies to

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

Caution

This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).

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);
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory, Func<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
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")>]
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

factory
ILoggerFactory

The ILoggerFactory to use.

filter
Func<String,LogLevel,Boolean>

The category filter to apply to logs.

includeScopes
Boolean

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

Returns

ILoggerFactory
Attributes

Applies to

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

builder
ILoggingBuilder

The ILoggingBuilder to use.

configure
Action<ConsoleLoggerOptions>

A delegate to configure the ConsoleLogger.

Returns

ILoggingBuilder

Applies to

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

Caution

This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).

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);
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this Microsoft.Extensions.Logging.ILoggerFactory factory, Func<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
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")>]
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

factory
ILoggerFactory

The ILoggerFactory to use.

filter
Func<String,LogLevel,Boolean>

The category filter to apply to logs.

Returns

ILoggerFactory
Attributes

Applies to

AddConsole(ILoggerFactory, Boolean)

Caution

This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).

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);
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this 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
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")>]
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

factory
ILoggerFactory

The ILoggerFactory to use.

includeScopes
Boolean

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

Returns

ILoggerFactory
Attributes

Applies to

AddConsole(ILoggerFactory, LogLevel, Boolean)

Caution

This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).

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);
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this 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
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")>]
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

factory
ILoggerFactory

The ILoggerFactory to use.

minLevel
LogLevel

The minimum LogLevel to be logged.

includeScopes
Boolean

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

Returns

ILoggerFactory
Attributes

Applies to

AddConsole(ILoggerFactory, IConsoleLoggerSettings)

Caution

This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).

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

factory
ILoggerFactory

The ILoggerFactory to use.

settings
IConsoleLoggerSettings

The settings to apply to created ConsoleLogger's.

Returns

ILoggerFactory
Attributes

Applies to

AddConsole(ILoggerFactory, IConfiguration)

Caution

This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).

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

factory
ILoggerFactory

The ILoggerFactory to use.

configuration
IConfiguration

The IConfiguration to use for IConsoleLoggerSettings.

Returns

ILoggerFactory
Attributes

Applies to

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

builder
ILoggingBuilder

The ILoggingBuilder to use.

Returns

ILoggingBuilder

Applies to

AddConsole(ILoggerFactory, LogLevel)

Caution

This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).

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);
public static Microsoft.Extensions.Logging.ILoggerFactory AddConsole (this 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
[<System.Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddConsole(this ILoggingBuilder builder).")>]
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

factory
ILoggerFactory

The ILoggerFactory to use.

minLevel
LogLevel

The minimum LogLevel to be logged.

Returns

ILoggerFactory
Attributes

Applies to