(client) chore:Clean code

This commit is contained in:
2025-08-28 16:20:24 +08:00
parent 909e995e15
commit c3bff1cf88
76 changed files with 5689 additions and 445 deletions

View File

@ -15,7 +15,7 @@ namespace Logging
public string StackTrace;
public override string ToString() =>
$"[{Timestamp:HH:mm:ss}] [{Type}] {Message}" +
$"[{Timestamp:HH:mm:ss}] [{Type}] {Message}" +
(Type == LogType.Exception ? $"\n{StackTrace}" : "");
}
@ -27,8 +27,10 @@ namespace Logging
public static int MaxLogs
{
get => _maxLogs;
set {
lock (_lock) {
set
{
lock (_lock)
{
_maxLogs = Mathf.Max(value, 1); // 最小值为1
TrimExcess();
}