ConsoleLoggerExtensions Class¶
- Namespace
Microsoft.Extensions.Logging
- Assemblies
- Microsoft.Extensions.Logging.Console
Syntax¶
public class ConsoleLoggerExtensions
-
class
Microsoft.Extensions.Logging.
ConsoleLoggerExtensions
Methods¶
-
AddConsole
(Microsoft.Extensions.Logging.ILoggerFactory)¶ Adds a console logger that is enabled for
Microsoft.Extensions.Logging.LogLevel
.Information or higher.Return type: Microsoft.Extensions.Logging.ILoggerFactory public static ILoggerFactory AddConsole(this ILoggerFactory factory)
-
AddConsole
(Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Extensions.Configuration.IConfiguration) Return type: Microsoft.Extensions.Logging.ILoggerFactory public static ILoggerFactory AddConsole(this ILoggerFactory factory, IConfiguration configuration)
-
AddConsole
(Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Extensions.Logging.Console.IConsoleLoggerSettings) Return type: Microsoft.Extensions.Logging.ILoggerFactory public static ILoggerFactory AddConsole(this ILoggerFactory factory, IConsoleLoggerSettings settings)
-
AddConsole
(Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Extensions.Logging.LogLevel) Adds a console logger that is enabled for
Microsoft.Extensions.Logging.LogLevel
s of minLevel or higher.Arguments: - factory (Microsoft.Extensions.Logging.ILoggerFactory) – The
Microsoft.Extensions.Logging.ILoggerFactory
to use. - minLevel (Microsoft.Extensions.Logging.LogLevel) – The minimum
Microsoft.Extensions.Logging.LogLevel
to be logged
Return type: public static ILoggerFactory AddConsole(this ILoggerFactory factory, LogLevel minLevel)
- factory (Microsoft.Extensions.Logging.ILoggerFactory) – The
-
AddConsole
(Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Extensions.Logging.LogLevel, System.Boolean) Adds a console logger that is enabled for
Microsoft.Extensions.Logging.LogLevel
s of minLevel or higher.Arguments: - minLevel (Microsoft.Extensions.Logging.LogLevel) – The minimum
Microsoft.Extensions.Logging.LogLevel
to be logged - includeScopes (System.Boolean) – A value which indicates whether log scope information should be displayed in the output.
Return type: public static ILoggerFactory AddConsole(this ILoggerFactory factory, LogLevel minLevel, bool includeScopes)
- minLevel (Microsoft.Extensions.Logging.LogLevel) – The minimum
-
AddConsole
(Microsoft.Extensions.Logging.ILoggerFactory, System.Boolean) Adds a console logger that is enabled for
Microsoft.Extensions.Logging.LogLevel
.Information or higher.Arguments: includeScopes (System.Boolean) – A value which indicates whether log scope information should be displayed in the output. Return type: Microsoft.Extensions.Logging.ILoggerFactory public static ILoggerFactory AddConsole(this ILoggerFactory factory, bool includeScopes)
-
AddConsole
(Microsoft.Extensions.Logging.ILoggerFactory, System.Func<System.String, Microsoft.Extensions.Logging.LogLevel, System.Boolean>) Adds a console logger that is enabled as defined by the filter function.
Return type: Microsoft.Extensions.Logging.ILoggerFactory public static ILoggerFactory AddConsole(this ILoggerFactory factory, Func<string, LogLevel, bool> filter)
-
AddConsole
(Microsoft.Extensions.Logging.ILoggerFactory, System.Func<System.String, Microsoft.Extensions.Logging.LogLevel, System.Boolean>, System.Boolean) Adds a console logger that is enabled as defined by the filter function.
Arguments: includeScopes (System.Boolean) – A value which indicates whether log scope information should be displayed in the output. Return type: Microsoft.Extensions.Logging.ILoggerFactory public static ILoggerFactory AddConsole(this ILoggerFactory factory, Func<string, LogLevel, bool> filter, bool includeScopes)
-