ConsoleLogger 类

定义

注意

This type is obsolete and will be removed in a future version. The recommended alternative is ConsoleLoggerProvider.

表示在控制台中写入消息的记录器。

public ref class ConsoleLogger : Microsoft::Extensions::Logging::ILogger
public class ConsoleLogger : Microsoft.Extensions.Logging.ILogger
[System.Obsolete("This type is obsolete and will be removed in a future version. The recommended alternative is ConsoleLoggerProvider.")]
public class ConsoleLogger : Microsoft.Extensions.Logging.ILogger
type ConsoleLogger = class
    interface ILogger
[<System.Obsolete("This type is obsolete and will be removed in a future version. The recommended alternative is ConsoleLoggerProvider.")>]
type ConsoleLogger = class
    interface ILogger
Public Class ConsoleLogger
Implements ILogger
继承
ConsoleLogger
属性
实现

构造函数

ConsoleLogger(String, Func<String,LogLevel,Boolean>, Boolean)
已过时.

表示在控制台中写入消息的记录器。

ConsoleLogger(String, Func<String,LogLevel,Boolean>, IExternalScopeProvider)
已过时.

表示在控制台中写入消息的记录器。

属性

Console
已过时.

表示在控制台中写入消息的记录器。

DisableColors
已过时.

表示在控制台中写入消息的记录器。

Filter
已过时.

表示在控制台中写入消息的记录器。

IncludeScopes
已过时.

表示在控制台中写入消息的记录器。

Name
已过时.

表示在控制台中写入消息的记录器。

方法

BeginScope<TState>(TState)
已过时.

开始逻辑操作范围。

Equals(Object)
已过时.

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()
已过时.

作为默认哈希函数。

(继承自 Object)
GetType()
已过时.

获取当前实例的 Type

(继承自 Object)
IsEnabled(LogLevel)
已过时.

检查是否已启用给定 logLevel

Log<TState>(LogLevel, EventId, TState, Exception, Func<TState,Exception,String>)
已过时.

写入日志项。

MemberwiseClone()
已过时.

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()
已过时.

返回表示当前对象的字符串。

(继承自 Object)
WriteMessage(LogLevel, String, Int32, String, Exception)
已过时.

表示在控制台中写入消息的记录器。

扩展方法

BeginScope(ILogger, String, Object[])
已过时.

设置消息格式并创建范围。

Log(ILogger, LogLevel, EventId, Exception, String, Object[])
已过时.

在指定的日志级别设置日志消息格式并写入该消息。

Log(ILogger, LogLevel, EventId, String, Object[])
已过时.

在指定的日志级别设置日志消息格式并写入该消息。

Log(ILogger, LogLevel, Exception, String, Object[])
已过时.

在指定的日志级别设置日志消息格式并写入该消息。

Log(ILogger, LogLevel, String, Object[])
已过时.

在指定的日志级别设置日志消息格式并写入该消息。

LogCritical(ILogger, EventId, Exception, String, Object[])
已过时.

设置关键日志消息格式并写入该消息。

LogCritical(ILogger, EventId, String, Object[])
已过时.

设置关键日志消息格式并写入该消息。

LogCritical(ILogger, Exception, String, Object[])
已过时.

设置关键日志消息格式并写入该消息。

LogCritical(ILogger, String, Object[])
已过时.

设置关键日志消息格式并写入该消息。

LogDebug(ILogger, EventId, Exception, String, Object[])
已过时.

设置调试日志消息格式并写入该消息。

LogDebug(ILogger, EventId, String, Object[])
已过时.

设置调试日志消息格式并写入该消息。

LogDebug(ILogger, Exception, String, Object[])
已过时.

设置调试日志消息格式并写入该消息。

LogDebug(ILogger, String, Object[])
已过时.

设置调试日志消息格式并写入该消息。

LogError(ILogger, EventId, Exception, String, Object[])
已过时.

设置错误日志消息格式并写入该消息。

LogError(ILogger, EventId, String, Object[])
已过时.

设置错误日志消息格式并写入该消息。

LogError(ILogger, Exception, String, Object[])
已过时.

设置错误日志消息格式并写入该消息。

LogError(ILogger, String, Object[])
已过时.

设置错误日志消息格式并写入该消息。

LogInformation(ILogger, EventId, Exception, String, Object[])
已过时.

设置信息日志消息格式并写入该消息。

LogInformation(ILogger, EventId, String, Object[])
已过时.

设置信息日志消息格式并写入该消息。

LogInformation(ILogger, Exception, String, Object[])
已过时.

设置信息日志消息格式并写入该消息。

LogInformation(ILogger, String, Object[])
已过时.

设置信息日志消息格式并写入该消息。

LogTrace(ILogger, EventId, Exception, String, Object[])
已过时.

设置跟踪日志消息格式并写入该消息。

LogTrace(ILogger, EventId, String, Object[])
已过时.

设置跟踪日志消息格式并写入该消息。

LogTrace(ILogger, Exception, String, Object[])
已过时.

设置跟踪日志消息格式并写入该消息。

LogTrace(ILogger, String, Object[])
已过时.

设置跟踪日志消息格式并写入该消息。

LogWarning(ILogger, EventId, Exception, String, Object[])
已过时.

设置警告日志消息格式并写入该消息。

LogWarning(ILogger, EventId, String, Object[])
已过时.

设置警告日志消息格式并写入该消息。

LogWarning(ILogger, Exception, String, Object[])
已过时.

设置警告日志消息格式并写入该消息。

LogWarning(ILogger, String, Object[])
已过时.

设置警告日志消息格式并写入该消息。

适用于