Skip to content

Commit 849b78e

Browse files
committed
refactor(GameApp): 移除未使用的日志类型拼接逻辑
清理不再需要的日志类型拼接代码,简化日志配置逻辑
1 parent 2d80dd8 commit 849b78e

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

GameFrameX.StartUp/GameApp.cs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -172,24 +172,23 @@ public static async Task Entry(string[] args, Action initAction, Action<LogOptio
172172
LogOptions.Default.LogEventLevel = launcherOptions.LogEventLevel;
173173
LogOptions.Default.RollingInterval = launcherOptions.LogRollingInterval;
174174
// 构建LogType,当值为空或默认值时不拼接
175-
var logTypeParts = new List<string>();
175+
// var logTypeParts = new List<string>();
176+
//
177+
// if (!string.IsNullOrWhiteSpace(launcherOptions.ServerType))
178+
// {
179+
// logTypeParts.Add(launcherOptions.ServerType);
180+
// }
181+
//
182+
// if (launcherOptions.ServerId > 0)
183+
// {
184+
// logTypeParts.Add(launcherOptions.ServerId.ToString());
185+
// }
186+
//
187+
// if (launcherOptions.ServerInstanceId > 0)
188+
// {
189+
// logTypeParts.Add(launcherOptions.ServerInstanceId.ToString());
190+
// }
176191

177-
if (!string.IsNullOrWhiteSpace(launcherOptions.ServerType))
178-
{
179-
logTypeParts.Add(launcherOptions.ServerType);
180-
}
181-
182-
if (launcherOptions.ServerId > 0)
183-
{
184-
logTypeParts.Add(launcherOptions.ServerId.ToString());
185-
}
186-
187-
if (launcherOptions.ServerInstanceId > 0)
188-
{
189-
logTypeParts.Add(launcherOptions.ServerInstanceId.ToString());
190-
}
191-
192-
LogOptions.Default.LogType = logTypeParts.Count > 0 ? string.Join("_", logTypeParts) : null;
193192
if (launcherOptions.TagName.IsNotNullOrWhiteSpace())
194193
{
195194
LogOptions.Default.LogTagName = launcherOptions.TagName;

0 commit comments

Comments
 (0)