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

Mark some spammy logs as verbose. #238

Conversation

mutexlox-signal
Copy link
Contributor

@mutexlox-signal mutexlox-signal commented Oct 18, 2024

In a very brief usage of cubeb-coreaudio-rs, I observed substantial log output from the following lines: (format is "<count> <file>:<line>")

880 mod.rs:1767
880 mod.rs:1848
1479 mod.rs:3274
1618 mod.rs:1758
2498 mod.rs:1715
3236 mod.rs:1727
8870 device_property.rs:268
8870 device_property.rs:282
9708 mod.rs:2014

Of these, only one (mod.rs:1848) is an error. The others are informational, so make them verbose logs.

In a very brief usage of cubeb-coreaudio-rs (<1 minute), I observed
substantial log output from the following lines:

 880  mod.rs:1767
 880  mod.rs:1848
1479  mod.rs:3274
1618  mod.rs:1758
2498  mod.rs:1715
3236  mod.rs:1727
8870  device_property.rs:268
8870  device_property.rs:282
9708  mod.rs:2014

Of these, only one (mod.rs:1848) is an error. The others are
informational, so make them verbose logs.
@mutexlox-signal
Copy link
Contributor Author

cc @padenot @kinetiknz for review :)

@padenot
Copy link
Collaborator

padenot commented Oct 21, 2024

This is intentional. Those logging statement are at the level "debug", and those are debugging information. Verbose is when outputting logging messages once per callback.

Generally, when logging in "debug" mode, all the information that let the cubeb developer understand how a stream was created, including the various workarounds on all platforms, are logged. Verbose is for things that are really verbose, happen during capture/rendering. Those aren't strict rules.

@mutexlox-signal
Copy link
Contributor Author

Got it, okay. It might be nice to have a distinction between "info" level logs and "warning/error" level logs, but that sounds like it would be a substantially larger project.

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

Successfully merging this pull request may close these issues.

2 participants