[pseudo][PATCH v2 12/23] pseudo_util: Add default log severity values
Mark Hatle <[email protected]> Fri, 3 Jul 2026 13:40:44 -0500
| Newsgroups | org.yoctoproject.lists.yocto-patches |
|---|---|
| Message-ID | <1783104055-19005-13-git-send-email-mark.hatle@kernel.crashing.org> |
From: Dmitry Sakhonchik <[email protected]> Default values are "show everything". If the user wants to see only certain categories, they should explicitely set PSEUDO_SEVERITY env var or use -k option. Signed-off-by: Dmitry Sakhonchik <[email protected]> Signed-off-by: Mark Hatle <[email protected]> --- pseudo.h | 2 ++ pseudo_util.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pseudo.h b/pseudo.h index 92ae71e..66aa70e 100644 --- a/pseudo.h +++ b/pseudo.h @@ -130,6 +130,8 @@ extern char *pseudo_version; #define PSEUDO_PIDFILE "pseudo.pid" #define PSEUDO_SOCKET "pseudo.socket" +#define PSEUDO_SEVERITY_DEFAULT "info,warn,error" + /* some systems might not have *at(). We like to define operations in * terms of each other, and for instance, open(...) is the same as * openat(AT_FDCWD, ...). If no AT_FDCWD is provided, any value that can't diff --git a/pseudo_util.c b/pseudo_util.c index 893a25b..4c05394 100644 --- a/pseudo_util.c +++ b/pseudo_util.c @@ -250,10 +250,11 @@ pseudo_init_util(void) { } free(env); env = pseudo_get_value("PSEUDO_SEVERITY"); - if (env) { - pseudo_severity_set(env); - pseudo_severity_flags_finalize(); + if (!env) { + env = strdup(PSEUDO_SEVERITY_DEFAULT); } + pseudo_severity_set(env); + pseudo_severity_flags_finalize(); free(env); } -- 1.8.3.1