summaryrefslogtreecommitdiffstats
path: root/common/console_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/console_common.c')
-rw-r--r--common/console_common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/console_common.c b/common/console_common.c
index bc3a305..4aa54de 100644
--- a/common/console_common.c
+++ b/common/console_common.c
@@ -193,7 +193,7 @@ static int console_common_init(void)
}
device_initcall(console_common_init);
-void log_print(unsigned flags)
+void log_print(unsigned flags, unsigned levels)
{
struct log_entry *log;
unsigned long last = 0;
@@ -202,6 +202,9 @@ void log_print(unsigned flags)
uint64_t diff = log->timestamp - time_beginning;
unsigned long difful;
+ if (levels && !(levels & (1 << log->level)))
+ continue;
+
if (flags & (BAREBOX_LOG_PRINT_RAW))
printf("<%i>", log->level);