You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// - 下调框架日志噪声:将 Microsoft 组件日志级别设为 Information,将 ASP.NET Core 设为 Warning,减少不必要的输出。
70
-
/// 该基础配置可在后续继续追加写入目标、丰富属性、最小日志级别等。
75
+
/// <para>- Enables context enrichment (Enrich.FromLogContext) to easily attach request or business context information to logs.</para>
76
+
/// <para>- Reduces framework log noise: sets Microsoft component log level to Information, ASP.NET Core to Warning, reducing unnecessary output.</para>
77
+
/// <para>This base configuration can be extended with additional write targets, enrichment properties, minimum log levels, etc.</para>
/// <exception cref="ArgumentNullException">当 <paramref name="logOptions"/> 参数为 null 时抛出 / Thrown when <paramref name="logOptions"/> parameter is null</exception>
117
+
/// <exception cref="ArgumentException">当 <paramref name="logOptions.LogTagName"/> 为空或仅包含空白字符时抛出 / Thrown when <paramref name="logOptions.LogTagName"/> is empty or contains only whitespace</exception>
118
+
/// <exception cref="DirectoryNotFoundException">日志文件目录不存在且无法创建时抛出 / Thrown when log file directory does not exist and cannot be created</exception>
119
+
/// <exception cref="UnauthorizedAccessException">没有权限创建日志目录或写入日志文件时抛出 / Thrown when there is no permission to create log directory or write log files</exception>
120
+
/// <exception cref="Exception">初始化日志系统过程中发生的其他异常 / Other exceptions that occur during log system initialization</exception>
121
+
/// <returns>配置好的 ILogger 实例 / The configured ILogger instance</returns>
/// <para>This method initializes the logging system based on the provided <paramref name="logOptions"/> configuration, supporting multiple output methods such as file, console, MongoDB, and Grafana Loki.</para>
124
+
/// <para>The exception types cover parameter validation, directory creation, insufficient permissions, and all possible exceptions during log system initialization.</para>
/// <param name="length">框架宽度,必须大于0的整数值 / The frame width, must be an integer greater than 0</param>
54
+
/// <exception cref="ArgumentOutOfRangeException">当 <paramref name="length"/> 小于等于0时抛出 / Thrown when <paramref name="length"/> is less than or equal to 0</exception>
55
55
/// <remarks>
56
-
/// 此设置会影响所有后续的控制台输出格式,包括标题框、配置信息框和分隔线的宽度。
56
+
/// This setting affects the width of all subsequent console output formats, including title boxes, configuration information boxes, and separator lines.
57
57
/// </remarks>
58
58
publicstaticvoidSetFrameLength(intlength)
59
59
{
@@ -64,13 +64,13 @@ public static void SetFrameLength(int length)
/// <param name="title">配置项标题,不能为null / The configuration item title, cannot be null</param>
87
+
/// <param name="content">配置内容对象,将调用ToString()方法显示,不能为null / The configuration content object, will call ToString() method to display, cannot be null</param>
88
+
/// <exception cref="ArgumentNullException">当任何参数为null时抛出 / Thrown when any parameter is null</exception>
89
89
/// <remarks>
90
-
/// 创建一个带有标题栏的信息框,标题会嵌入到顶部边框中,内容显示在框内。
91
-
/// 适用于显示系统配置、参数设置等结构化信息。
90
+
/// Creates an information box with a title bar, where the title is embedded in the top border and the content is displayed inside the box.
91
+
/// Suitable for displaying system configuration, parameter settings, and other structured information.
0 commit comments