Skip to content

Commit 3ed3b83

Browse files
committed
[增加]1. 增加程序参数 SaveDataInterval 设置数值异常的默认设置日志打印
1 parent a78c67b commit 3ed3b83

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

GameFrameX.Utility/Setting/GlobalSettings.cs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,21 @@ public static void SetCurrentSetting(AppSetting setting)
9090
ArgumentNullException.ThrowIfNull(setting, nameof(setting));
9191
if (setting.SaveDataInterval < 5000)
9292
{
93+
LogHelper.WarnConsole($"SaveDataInterval小于5000毫秒,使用默认值为:{GlobalConst.SaveIntervalInMilliSeconds} 毫秒");
9394
setting.SaveDataInterval = GlobalConst.SaveIntervalInMilliSeconds;
9495
}
95-
96-
if (setting.HttpUrl.IsNullOrEmptyOrWhiteSpace())
97-
{
98-
LogHelper.WarnConsole("HttpUrl为空,使用默认值为: /game/api/");
99-
setting.HttpUrl = "/game/api/";
100-
}
101-
102-
if (setting.NetWorkSendTimeOutSeconds < 1)
103-
{
104-
LogHelper.WarnConsole("NetWorkSendTimeOutSeconds小于1秒,使用默认值为:5 秒");
105-
setting.NetWorkSendTimeOutSeconds = 5;
106-
}
96+
97+
if (setting.HttpUrl.IsNullOrEmptyOrWhiteSpace())
98+
{
99+
LogHelper.WarnConsole("HttpUrl为空,使用默认值为: /game/api/");
100+
setting.HttpUrl = "/game/api/";
101+
}
102+
103+
if (setting.NetWorkSendTimeOutSeconds < 1)
104+
{
105+
LogHelper.WarnConsole("NetWorkSendTimeOutSeconds小于1秒,使用默认值为:5 秒");
106+
setting.NetWorkSendTimeOutSeconds = 5;
107+
}
107108

108109
CurrentSetting = setting;
109110
}

0 commit comments

Comments
 (0)