-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
${guid}, added GeneratedFromLogEvent #2226
${guid}, added GeneratedFromLogEvent #2226
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2226 +/- ##
=======================================
+ Coverage 82% 82% +<1%
=======================================
Files 304 304
Lines 21380 21399 +19
Branches 2577 2578 +1
=======================================
+ Hits 17470 17489 +19
Misses 3256 3256
Partials 654 654 |
byte i = (byte)(LogEventInfo.ZeroDate.Ticks >> 16); | ||
byte j = (byte)(LogEventInfo.ZeroDate.Ticks >> 8); | ||
byte k = (byte)(LogEventInfo.ZeroDate.Ticks); | ||
builder.Append(new Guid(logEvent.SequenceID, (short)logEvent.TimeStamp.Month, (short)logEvent.TimeStamp.Year, d, e, f, g, h, i, j, k).ToString(this.Format)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever approach!
But is this really a guid? (Global, unique)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is global unique identifier of a LogEvent within the running application. But probably not global in the universe.
93b600e
to
6c32da1
Compare
/// Generate the Guid from the NLog LogEvent (Will be the same for all targets) | ||
/// </summary> | ||
[DefaultValue(false)] | ||
public bool LogEventGuid { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about "basedOnLogEvent"? Or "GeneratedFromLogEvent"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snakefoot ? Your opinion please :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to GeneratedFromLogEvent
6c32da1
to
f74bff5
Compare
LogEvent will output the same Guid for all Targets. Resolves #60 (And maybe #107)