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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ApiService/ApiService/onefuzzlib/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public async Async.Task SendEvent(BaseEvent anEvent) {

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.

}

public async Async.Task<OneFuzzResult<DownloadableEventMessage>> GetDownloadableEvent(Guid eventId) {
Expand Down