Skip to content

Commit dd87abe

Browse files
committed
Allow "thread" property to be overwritten by caller
1 parent 311dc19 commit dd87abe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Eleven41.Logging.Loggly/LogglyLog.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ public void Log(DateTime date, LogLevels level, Dictionary<string, object> messa
104104
// Start with the standard properties
105105
Dictionary<string, object> data = new Dictionary<string, object>(this.Data);
106106

107+
// These fields are allowed to be overwritten by the caller
108+
data["thread"] = System.Threading.Thread.CurrentThread.GetHashCode();
109+
107110
// Add the message data
108111
if (messageData != null)
109112
{
@@ -117,7 +120,6 @@ public void Log(DateTime date, LogLevels level, Dictionary<string, object> messa
117120
data["message"] = String.Format(sFormat, args);
118121
data["level"] = level.ToString();
119122
data["date"] = date;
120-
data["thread"] = System.Threading.Thread.CurrentThread.GetHashCode();
121123

122124
// Serialize and dispatch
123125
string json = Newtonsoft.Json.JsonConvert.SerializeObject(data);

0 commit comments

Comments
 (0)