]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
helper/log: Add LOG_TARGET_USER()
authorMarc Schink <dev@zapb.de>
Tue, 22 Oct 2024 14:36:15 +0000 (16:36 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Mon, 30 Dec 2024 15:57:01 +0000 (15:57 +0000)
Add a target-related log function for user messages as it already
exists for other log levels.

Change-Id: I9076677d6451b900332583e748bab3f83df56d3b
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8661
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
src/helper/log.h

index dc8df6fbb6d8c26dfb99b6c19cb3cb77102c4cb8..e2bb131ed37ddd0e063d31466455dfb97b6d4a40 100644 (file)
@@ -152,6 +152,9 @@ extern int debug_level;
 #define LOG_TARGET_INFO(target, fmt_str, ...) \
        LOG_INFO("[%s] " fmt_str, target_name(target), ##__VA_ARGS__)
 
+#define LOG_TARGET_USER(target, fmt_str, ...) \
+       LOG_USER("[%s] " fmt_str, target_name(target), ##__VA_ARGS__)
+
 #define LOG_TARGET_WARNING(target, fmt_str, ...) \
        LOG_WARNING("[%s] " fmt_str, target_name(target), ##__VA_ARGS__)