Skip to content

Commit 1198faa

Browse files
author
mwatson
committed
Fix issue with environment not being overriden correctly from the config file.
1 parent 7eb178b commit 1198faa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Src/StackifyLib/Internal/Logs/LogClient.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ private Models.LogMsgGroup CreateDefaultMsgGroup()
244244
}
245245
else
246246
{
247-
group.ServerName = Environment.MachineName;
247+
group.ServerName = env.DeviceName;
248248
}
249249
}
250250

@@ -261,7 +261,8 @@ private Models.LogMsgGroup CreateDefaultMsgGroup()
261261

262262
group.AppLoc = env.AppLocation;
263263

264-
if (string.IsNullOrEmpty(group.Env))
264+
//override it
265+
if (!string.IsNullOrEmpty(env.ConfiguredEnvironmentName))
265266
{
266267
group.Env = env.ConfiguredEnvironmentName;
267268
}

0 commit comments

Comments
 (0)