(client) chore:Clean code
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user