* [PATCH] include: linux/printk.h: allow forcing log level per file
@ 2026-02-05 17:11 Ahmad Fatoum
2026-02-09 14:26 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-02-05 17:11 UTC (permalink / raw)
To: barebox; +Cc: 9l, Ahmad Fatoum
We support defining DEBUG or VERBOSE_DEBUG to increase the log level per
file, but we lack a way to decrease the log level.
The latter could be useful when shotgun debugging with all debug logging
enabled, as otherwise some debug output may drown out everything else.
To support this, allow LOGLEVEL to be defined per file. We don't expect
that any files committed to tree would do this, but it may turn out to
be useful during debugging.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/linux/printk.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 0d7180f0ebbc..b9b3ddeb4d39 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -22,7 +22,7 @@
#define LOGLEVEL MSG_VDEBUG
#elif defined DEBUG
#define LOGLEVEL MSG_DEBUG
-#else
+#elif !defined(LOGLEVEL)
#define LOGLEVEL CONFIG_COMPILE_LOGLEVEL
#endif
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] include: linux/printk.h: allow forcing log level per file
2026-02-05 17:11 [PATCH] include: linux/printk.h: allow forcing log level per file Ahmad Fatoum
@ 2026-02-09 14:26 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2026-02-09 14:26 UTC (permalink / raw)
To: barebox, Ahmad Fatoum; +Cc: 9l
On Thu, 05 Feb 2026 18:11:43 +0100, Ahmad Fatoum wrote:
> We support defining DEBUG or VERBOSE_DEBUG to increase the log level per
> file, but we lack a way to decrease the log level.
>
> The latter could be useful when shotgun debugging with all debug logging
> enabled, as otherwise some debug output may drown out everything else.
>
> To support this, allow LOGLEVEL to be defined per file. We don't expect
> that any files committed to tree would do this, but it may turn out to
> be useful during debugging.
>
> [...]
Applied, thanks!
[1/1] include: linux/printk.h: allow forcing log level per file
https://git.pengutronix.de/cgit/barebox/commit/?id=c4657de3af99 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-09 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-05 17:11 [PATCH] include: linux/printk.h: allow forcing log level per file Ahmad Fatoum
2026-02-09 14:26 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox