-
Notifications
You must be signed in to change notification settings - Fork 765
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
[SelfDiagnosticsModule] Write event to log file in a circular way in … #1418
[SelfDiagnosticsModule] Write event to log file in a circular way in … #1418
Conversation
…EventListener.OnEventWritten
Codecov Report
@@ Coverage Diff @@
## master #1418 +/- ##
==========================================
+ Coverage 81.72% 81.88% +0.15%
==========================================
Files 229 229
Lines 6095 6143 +48
==========================================
+ Hits 4981 5030 +49
+ Misses 1114 1113 -1
|
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.
A few comments, but LGTM
return position; | ||
} | ||
|
||
internal void WriteEvent(string eventMessage, ReadOnlyCollection<object> payload) |
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.
Would IReadOnlyCollection work? https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ireadonlycollection-1?view=netcore-3.1
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.
Yes, it would work. ReadOnlyCollection
implements a bunch of interfaces including IReadOnlyCollection
.
I used ReadOnlyCollection
because it's the type of the EventWrittenEventArgs.Payload Property. Should I prioritize interfaces over base classes in definition of methods?
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.
LGTM.
…EventListener.OnEventWritten
Provide implementation for classes for step#4 in Implementation Plan section of #1258.
Changes
Write event to log file in a circular way in SelfDiagnosticsEventListener.OnEventWritten.