File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Src/StackifyLib/Internal/Logs Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -161,20 +161,25 @@ public void QueueMessage(LogMsg msg)
161161 }
162162 else
163163 {
164+ var defaults = CreateDefaultMsgGroup ( ) ;
165+
166+ //default app, env, and server name if not set to whatever the current one is
167+ //do not default the other fields as they not match what is being set.
168+ //i.e. the default appnameid is not the correct id for a new custom app name being used.
164169 var d = message . AppDetails ;
165170 var group = new LogMsgGroup ( )
166171 {
167172 AppEnvID = d . AppEnvID ,
168173 AppLoc = d . AppLoc ,
169- AppName = d . AppName ,
174+ AppName = d . AppName ?? defaults . AppName ,
170175 AppNameID = d . AppNameID ,
171176 CDAppID = d . CDAppID ,
172177 CDID = d . CDID ,
173- Env = d . Env ,
178+ Env = d . Env ?? defaults . Env ,
174179 EnvID = d . EnvID ,
175180 Logger = _LoggerName ,
176181 Platform = ".net" ,
177- ServerName = d . ServerName ,
182+ ServerName = d . ServerName ?? defaults . ServerName ,
178183 Msgs = new List < LogMsg > ( )
179184 } ;
180185
You can’t perform that action at this time.
0 commit comments