Skip to content

[Merged by Bors] - Don't log a trace if EventWriter::send_batch is empty - #7753

Closed
james7132 wants to merge 1 commit into
bevyengine:mainfrom
james7132:no-trace-empty-batch
Closed

james7132 wants to merge 1 commit into
bevyengine:mainfrom
james7132:no-trace-empty-batch

Conversation

@james7132

Copy link
Copy Markdown
Member

Objective

Fix #5026.

Solution

Only make a trace! log if the event count changed.


Changelog

Changed: EventWriter::send_batch will only log a TRACE level log if the batch is non-empty.

@james7132 james7132 changed the title Don't log a trace if Events::send_batch is empty Don't log a trace if EventWriter::send_batch is empty Feb 20, 2023
@james7132 james7132 added C-Bug An unexpected or incorrect behavior A-ECS Entities, components, systems, and events A-Diagnostics Logging, crash handling, error reporting and performance analysis labels Feb 20, 2023
@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 20, 2023
@alice-i-cecile

Copy link
Copy Markdown
Member

bors r+

bors Bot pushed a commit that referenced this pull request Feb 20, 2023
# Objective
Fix #5026.

## Solution
Only make a `trace!` log if the event count changed.

---

## Changelog
Changed: `EventWriter::send_batch` will only log a TRACE level log if the batch is non-empty.
@bors bors Bot changed the title Don't log a trace if EventWriter::send_batch is empty [Merged by Bors] - Don't log a trace if EventWriter::send_batch is empty Feb 20, 2023
@bors bors Bot closed this Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Diagnostics Logging, crash handling, error reporting and performance analysis A-ECS Entities, components, systems, and events C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Events .send_batch makes a trace! entry even for empty insertions

3 participants