Show / Hide Table of Contents

    ILogger 接口

    提供记录日志的方法。

    命名空间: HuajiTech.CoolQ
    程序集: HuajiTech.CoolQ.Abstractions.dll
    语法
    public interface ILogger

    方法

    | 改善此文档 查看源代码

    Log(String, String)

    记录一条日志。

    声明
    void Log(string type, string message)
    参数
    类型 名称 描述
    System.String type

    日志的类型。

    System.String message

    日志的消息。

    | 改善此文档 查看源代码

    LogDebug(String, String)

    记录一条等级为调试的日志。

    声明
    void LogDebug(string type, string message)
    参数
    类型 名称 描述
    System.String type

    日志的类型。

    System.String message

    日志的消息。

    | 改善此文档 查看源代码

    LogError(String, String)

    记录一条等级为错误的日志。

    声明
    void LogError(string type, string message)
    参数
    类型 名称 描述
    System.String type

    日志的类型。

    System.String message

    日志的消息。

    | 改善此文档 查看源代码

    LogFatal(String, String)

    记录一条等级为致命的日志。

    声明
    [Obsolete("在适用处使用 RaiseFatal。有关详细信息,请参阅备注部分。")]
    void LogFatal(string type, string message)
    参数
    类型 名称 描述
    System.String type

    日志的类型。

    System.String message

    日志的消息。

    备注

    该方法弹出一个错误提示窗口,该窗口不包括调用堆栈和重载应用选项。 如非必要,请改为使用 RaiseFatal(String)。

    | 改善此文档 查看源代码

    LogReceiving(String, String)

    记录一条等级为接收的日志。

    声明
    void LogReceiving(string type, string message)
    参数
    类型 名称 描述
    System.String type

    日志的类型。

    System.String message

    日志的消息。

    | 改善此文档 查看源代码

    LogSending(String, String)

    记录一条等级为发送的日志。

    声明
    void LogSending(string type, string message)
    参数
    类型 名称 描述
    System.String type

    日志的类型。

    System.String message

    日志的消息。

    | 改善此文档 查看源代码

    LogSuccess(String, String)

    记录一条等级为成功的日志。

    声明
    void LogSuccess(string type, string message)
    参数
    类型 名称 描述
    System.String type

    日志的类型。

    System.String message

    日志的消息。

    | 改善此文档 查看源代码

    LogWarning(String, String)

    记录一条等级为警告的日志。

    声明
    void LogWarning(string type, string message)
    参数
    类型 名称 描述
    System.String type

    日志的类型。

    System.String message

    日志的消息。

    | 改善此文档 查看源代码

    RaiseFatal(String)

    引发一个致命错误。

    声明
    void RaiseFatal(string message)
    参数
    类型 名称 描述
    System.String message

    致命错误的消息。

    扩展方法

    LoggingExtensions.LogDebug(ILogger, String)
    LoggingExtensions.Log(ILogger, String)
    LoggingExtensions.LogSending(ILogger, String)
    LoggingExtensions.LogReceiving(ILogger, String)
    LoggingExtensions.LogSuccess(ILogger, String)
    LoggingExtensions.LogWarning(ILogger, String)
    LoggingExtensions.LogError(ILogger, String)
    • 改善此文档
    • 查看源代码
    Back to top 本文档使用 CC BY-NC-SA 4.0 进行许可。