Skip to content

Commit fe9b3c3

Browse files
author
mwatson
committed
Change for Prefix if we pass certain data or not
1 parent a1b59bf commit fe9b3c3

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Src/StackifyLib/Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static string Get(string key, string defaultValue = null)
2727
if (key != null)
2828
{
2929
v = ConfigurationManager.AppSettings[key];
30-
if (v == null)
30+
if (string.IsNullOrEmpty(v))
3131
v = Environment.GetEnvironmentVariable(key);
3232
}
3333
}

Src/StackifyLib/Internal/Logs/LogClient.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,15 @@ public void QueueMessage(LogMsg msg)
140140
}
141141

142142
//Used by Stackify profiler only
143-
msg.SetLogMsgID(msg.id, isError, msg.Level, msg.Msg, msg.data);
143+
if (Logger.PrefixEnabled())
144+
{
145+
msg.SetLogMsgID(msg.id, isError, msg.Level, msg.Msg, msg.data);
146+
}
147+
else
148+
{
149+
msg.SetLogMsgID(msg.id, isError, msg.Level, null, null);
150+
}
151+
144152

145153
//We need to do everything up to this point for sasquatch. Even if we aren't uploading the log.
146154
if (this.CanQueue())

Src/StackifyLib/Logger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public static bool PrefixEnabled()
308308
if (_PrefixEnabled != null)
309309
return _PrefixEnabled.Value;
310310

311-
var variable = Environment.GetEnvironmentVariable("StackSquatchUpdated");
311+
var variable = Environment.GetEnvironmentVariable("StackSquatchUpdated", EnvironmentVariableTarget.Machine);
312312

313313

314314
if (!string.IsNullOrEmpty(variable))

0 commit comments

Comments
 (0)