Skip to content
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

Change debug! to trace! to reduce logging noise #2284

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Oct 7, 2024

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • I have used cargo xtask fmt-packages command to ensure that all changed code is formatted correctly.
  • My changes were added to the CHANGELOG.md in the proper section.
  • I have added necessary changes to user code to the Migration Guide.
  • My changes are in accordance to the esp-rs API guidelines

Extra:

Pull Request Details 📖

Description

Fixes #2282 - most of these are just noise and irrelevant for users

This doesn't deserve a changelog entry

Testing

Examples still work

@bjoernQ bjoernQ added the skip-changelog No changelog modification needed label Oct 7, 2024
Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

Glad I saw this, was just going to start working on this myself 😁 Thanks!

@@ -65,18 +68,18 @@ pub fn compat_timer_arm_us(ets_timer: *mut ets_timer, us: u32, repeat: bool) {
timer.active = true;
timer.periodic = repeat;
} else {
debug!("timer_arm_us {:x} not found", ets_timer as usize);
trace!("timer_arm_us {:x} not found", ets_timer as usize);
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably should remain at a higher level

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are all quite frequent (with BLE at least) currently while things work fine -maybe they should be kept as debug and investigated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it's fine if they call disarm or done on a timer we don't know (yet) about
I'm not too sure if it's the same for arm? In theory if they never did setfn we cannot/don't need to do much - or maybe we should just initialize the timer in arm anyway with a no-op callback

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah maybe if these timers are statically allocated...

timer.active = false;
} else {
debug!("timer_disarm {:x} not found", ets_timer as usize);
trace!("timer_disarm {:x} not found", ets_timer as usize);
Copy link
Contributor

Choose a reason for hiding this comment

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

This one, too

timer.active = false;

(*ets_timer).priv_ = core::ptr::null_mut();
(*ets_timer).expire = 0;

TIMERS.swap_remove(idx);
} else {
debug!("timer_done {:x} not found", ets_timer as usize);
trace!("timer_done {:x} not found", ets_timer as usize);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

Copy link
Contributor

@JurajSadel JurajSadel left a comment

Choose a reason for hiding this comment

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

Thanks!

@JurajSadel JurajSadel added this pull request to the merge queue Oct 7, 2024
Merged via the queue into esp-rs:main with commit e5bc639 Oct 7, 2024
29 checks passed
@bjoernQ bjoernQ deleted the esp-wifi/reduce-log-levels branch November 26, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No changelog modification needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

esp-wifi: Reduce logging level for normal timer operations.
4 participants