@@ -124,7 +124,7 @@ public static async Task Entry(string[] args, Action initAction, Action<LogOptio
124124 {
125125 LogHelper . Info ( $ "the type of server that is launched : { serverType } ") ;
126126 }
127-
127+
128128 LogOptions . Default . GrafanaLokiLabels = new Dictionary < string , string > ( ) ;
129129
130130 if ( launcherOptions != null )
@@ -174,7 +174,7 @@ public static async Task Entry(string[] args, Action initAction, Action<LogOptio
174174 {
175175 logTypeParts . Add ( launcherOptions . ServerInstanceId . ToString ( ) ) ;
176176 }
177-
177+
178178 if ( launcherOptions . TagName . IsNotNullOrWhiteSpace ( ) )
179179 {
180180 LogOptions . Default . LogTagName = launcherOptions . TagName ;
@@ -191,13 +191,11 @@ public static async Task Entry(string[] args, Action initAction, Action<LogOptio
191191 {
192192 LogOptions . Default . LogTagName = launcherOptions . Description ;
193193 }
194-
194+
195195 LogOptions . Default . LogTagName = logTypeParts . Count > 0 ? string . Join ( "_" , logTypeParts ) : null ;
196196 }
197197
198198 logConfiguration ? . Invoke ( LogOptions . Default ) ;
199- LogOptions . Default . LogType = serverType ;
200- LogHandler . Create ( LogOptions . Default ) ;
201199
202200 GlobalSettings . Load ( "Configs/app_config.json" ) ;
203201 initAction ? . Invoke ( ) ;
@@ -309,6 +307,8 @@ private static Task Start(string[] args, Type appStartUpType, string serverType,
309307 return Task . CompletedTask ;
310308 }
311309
310+ LogOptions . Default . LogType = serverType ;
311+ LogHandler . Create ( LogOptions . Default ) ;
312312 var isSuccess = startUp . Init ( serverType , setting , args ) ;
313313 if ( ! isSuccess )
314314 {
0 commit comments