mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
ratelimit: fix log levels of log suppression messages
When logging a suppression message do so on the same log level as the
suppressed messages.
Cherry picked by Colin Guthrie from ec5a785712
with a couple of additional changes due to extra limiting in master
that was not present in stable-queue.
This commit is contained in:
parent
a509f10f95
commit
1250b5d735
13 changed files with 19 additions and 18 deletions
|
|
@ -431,7 +431,7 @@ void pa_log_level(pa_log_level_t level, const char *format, ...) {
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
pa_bool_t pa_log_ratelimit(void) {
|
||||
pa_bool_t pa_log_ratelimit(pa_log_level_t level) {
|
||||
/* Not more than 10 messages every 5s */
|
||||
static PA_DEFINE_RATELIMIT(ratelimit, 5 * PA_USEC_PER_SEC, 10);
|
||||
|
||||
|
|
@ -440,5 +440,5 @@ pa_bool_t pa_log_ratelimit(void) {
|
|||
if (no_rate_limit)
|
||||
return TRUE;
|
||||
|
||||
return pa_ratelimit_test(&ratelimit);
|
||||
return pa_ratelimit_test(&ratelimit, level);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue