将record切换回class, 不再使用CST时间,使用DateTime.Now

This commit is contained in:
2024-04-16 06:29:21 +08:00
parent 4171756c54
commit 6ef7aca8ae
8 changed files with 71 additions and 32 deletions
+2 -1
View File
@@ -23,11 +23,12 @@ public class SimApiLogger(string name) : ILogger
_ => ConsoleColor.White
};
var message =
$"[ {name} ][ {SimApiUtil.CstNow.ToString("yyyy-MM-dd HH:mm:ss:ffff")} ][ {logLevel.ToString()} ]\n{state}\n";
$"[ {name} ][ {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff")} ][ {logLevel.ToString()} ]\n{state}\n";
if (exception != null)
{
message += $"{exception}\n";
}
Console.WriteLine(message);
}
}