|
@ -358,8 +358,27 @@ public static class Extensions |
|
|
|
|
|
|
|
|
#region Logger
|
|
|
#region Logger
|
|
|
|
|
|
|
|
|
/// <summary>记录文本。多个 Content 参数将以“ | ”分隔,此方法等同于 <see cref="Logger.Text"/>。</summary>
|
|
|
/// <summary>记录文本。多个 Content 参数将以“ | ”分隔。</summary>
|
|
|
public static void Write(this Logger logger, object sender, params object[] content) => logger?.Text(sender, null, content, null); |
|
|
public static void Write(this Logger logger, params object[] content) => logger?.Output(null, content, null); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>记录异常。</summary>
|
|
|
|
|
|
public static void Exception<T>(this Logger logger, T exception, params object[] content) where T : Exception => logger?.Output("Exception", content, exception); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>记录错误。多个 Content 参数将以“ | ”分隔。</summary>
|
|
|
|
|
|
public static void Error(this Logger logger, params object[] content) => logger?.Output("Error", content, null); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>记录警告。多个 Content 参数将以“ | ”分隔。</summary>
|
|
|
|
|
|
public static void Warning(this Logger logger, params object[] content) => logger?.Output("Warning", content, null); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>记录警告。多个 Content 参数将以“ | ”分隔。</summary>
|
|
|
|
|
|
public static void Info(this Logger logger, params object[] content) => logger?.Output("Info", content, null); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>记录文本。多个 Content 参数将以“ | ”分隔。</summary>
|
|
|
|
|
|
public static void Text(this Logger logger, params object[] content) => logger?.Output(null, content, null); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>记录调试。多个 Content 参数将以“ | ”分隔。</summary>
|
|
|
|
|
|
[Conditional("DEBUG")] |
|
|
|
|
|
public static void Debug(this Logger logger, params object[] content) => logger?.Output("Debug", content, null); |
|
|
|
|
|
|
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|