diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/log.c | 4 | ||||
-rw-r--r-- | common/log_console.c | 1 | ||||
-rw-r--r-- | common/log_syslog.c | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/common/log.c b/common/log.c index ac34f1c97b9..d6dfabb09a6 100644 --- a/common/log.c +++ b/common/log.c @@ -207,7 +207,8 @@ static int log_dispatch(struct log_rec *rec) /* Emit message */ processing_msg = 1; list_for_each_entry(ldev, &gd->log_head, sibling_node) { - if (log_passes_filters(ldev, rec)) + if ((ldev->flags & LOGDF_ENABLE) && + log_passes_filters(ldev, rec)) ldev->drv->emit(ldev, rec); } processing_msg = 0; @@ -329,6 +330,7 @@ int log_init(void) } INIT_LIST_HEAD(&ldev->filter_head); ldev->drv = drv; + ldev->flags = drv->flags; list_add_tail(&ldev->sibling_node, (struct list_head *)&gd->log_head); drv++; diff --git a/common/log_console.c b/common/log_console.c index bb3f8464b98..8776fd47039 100644 --- a/common/log_console.c +++ b/common/log_console.c @@ -44,4 +44,5 @@ static int log_console_emit(struct log_device *ldev, struct log_rec *rec) LOG_DRIVER(console) = { .name = "console", .emit = log_console_emit, + .flags = LOGDF_ENABLE, }; diff --git a/common/log_syslog.c b/common/log_syslog.c index 2ae703fed71..8276883780d 100644 --- a/common/log_syslog.c +++ b/common/log_syslog.c @@ -107,4 +107,5 @@ out: LOG_DRIVER(syslog) = { .name = "syslog", .emit = log_syslog_emit, + .flags = LOGDF_ENABLE, }; |