Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Update log message to accurately represent action being take #3366

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tevoinea
Copy link
Member

Summary of the Pull Request

What is this about?

We log a message "sending event" when we are actually only logging an event.

@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2023

Codecov Report

Merging #3366 (453910a) into main (55aa7e5) will decrease coverage by 0.65%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #3366      +/-   ##
==========================================
- Coverage   32.33%   31.68%   -0.65%     
==========================================
  Files         275      308      +33     
  Lines       31995    37628    +5633     
==========================================
+ Hits        10344    11923    +1579     
- Misses      21651    25705    +4054     
Files Changed Coverage Δ
src/ApiService/ApiService/onefuzzlib/Events.cs 70.68% <0.00%> (ø)

... and 55 files with indirect coverage changes

@@ -89,7 +89,7 @@ public class Events : IEvents {

public virtual void LogEvent(BaseEvent anEvent) {
var serializedEvent = JsonSerializer.Serialize(anEvent, anEvent.GetType(), _options);
_log.LogInformation("sending event: {EventType} - {serializedEvent}", anEvent.GetEventType(), serializedEvent);
_log.LogInformation("logging event: {EventType} - {serializedEvent}", anEvent.GetEventType(), serializedEvent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was meant to describe what is happening on line 86.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, I think we could remove LogEvent since it's only used by SendEvent. It'll make things a little clearer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree but I think this function is used elsewhere. If that is the case, I suggest you take the log message string (or just a prefix) as parameter to this function. That wat you keep the intent close to where it is being used.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants