1
Fork 0

journal: copy log level to chained logger

Make sure the log level on the chained logger is the same as ours.

Makes PIPEWIRE_DEBUG=3 make run print debug again.

This used to work because the log level was parsed and set before the
loggers were created and chained, and so they all got the same level.

Now that the level can be changed with metadata at runtime, we can't
really update all past loggers so let the journal logger copy the
level itself.
This commit is contained in:
Wim Taymans 2024-01-04 13:57:26 +01:00
parent 76de766cd8
commit e088dd2d2f
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ impl_log_logtv(void *object,
if (impl->chain_log != NULL) {
va_list args_copy;
va_copy(args_copy, args);
impl->chain_log->level = impl->log.level;
spa_log_logtv(impl->chain_log,
level, topic,
file, line, func, fmt, args_copy);