Skip to content

Commit 4f92160

Browse files
committed
refactor(Logger): 将日志模板中的FriendlyName替换为TagName
修改日志输出模板中的占位符名称,使其更准确地反映实际用途
1 parent 1ad2b1c commit 4f92160

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

GameFrameX.Foundation.Logger/LogOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,12 @@ public LogOptions(string logPathName = "logs")
206206
/// 支持的占位符包括:
207207
/// - {Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} - 完整时间戳(包含毫秒和时区)
208208
/// - {Level:u3} - 日志级别(3个字符大写)
209-
/// - {FriendlyName} - 友好名称
209+
/// - {TagName} - 日志标签名称
210210
/// - {Message:lj} - 日志消息内容(左对齐)
211211
/// - {NewLine} - 换行符
212212
/// - {Exception} - 异常信息
213213
/// </remarks>
214-
public string FileOutputTemplate { get; set; } = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}][{FriendlyName}] {Message:lj}{NewLine}{Exception}";
214+
public string FileOutputTemplate { get; set; } = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}][{TagName}]{Message:lj}{NewLine}{Exception}";
215215

216216
/// <summary>
217217
/// 返回日志配置对象的 JSON 字符串表示形式。

0 commit comments

Comments
 (0)