summaryrefslogtreecommitdiff
path: root/common/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/log.c')
-rw-r--r--common/log.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/log.c b/common/log.c
index c5b9b489ca..734d26de4a 100644
--- a/common/log.c
+++ b/common/log.c
@@ -45,7 +45,11 @@ const char *log_get_cat_name(enum log_category_t cat)
if (cat >= LOGC_NONE)
return log_cat_name[cat - LOGC_NONE];
+#if CONFIG_IS_ENABLED(DM)
name = uclass_get_name((enum uclass_id)cat);
+#else
+ name = NULL;
+#endif
return name ? name : "<missing>";
}
@@ -317,7 +321,7 @@ int log_init(void)
gd->flags |= GD_FLG_LOG_READY;
if (!gd->default_log_level)
gd->default_log_level = CONFIG_LOG_DEFAULT_LEVEL;
- gd->log_fmt = LOGF_DEFAULT;
+ gd->log_fmt = log_get_default_format();
return 0;
}