ref: 日志中附带线程 ID
This commit is contained in:
1 parent
d3b657d725
commit
0b075c97c0
1 file changed
+1
-1
@@ -220,7 +220,7 @@ public class BaseLogger {
|
||||
.Join("\r\n");
|
||||
}
|
||||
public static string GetLogPrefix(LogLevel level, string filePath)
|
||||
=> $"{DateTime.Now:HH':'mm':'ss'.'fff} {level.ToString().First()} {(Thread.CurrentThread.Name is null ? "" : $"<{Thread.CurrentThread.Name}> ")}[{PathUtils.GetLastPart(filePath).BeforeFirst(".")}] ";
|
||||
=> $"{DateTime.Now:HH':'mm':'ss'.'fff} {level.ToString().First()} {(Thread.CurrentThread.Name is null ? "" : $"<{Thread.CurrentThread.ManagedThreadId} · {Thread.CurrentThread.Name}> ")}[{PathUtils.GetLastPart(filePath).BeforeFirst(".")}] ";
|
||||
|
||||
/// <summary>
|
||||
/// 执行 <see cref="LogBehavior"/>。
|
||||
|
||||
Reference in new issue
Block a user