From 05a6b812a3d4211a871d885b3e60515b339661cc Mon Sep 17 00:00:00 2001 From: Christopher Collins Date: Tue, 26 Jun 2018 12:04:12 -0700 Subject: [PATCH] Remove ble_hs_log; use modlog instead The host now uses the modlog package to write entries to the `LOG_MODULE_NIMBLE_HOST` module. It no longer calls into the log API directly, so it doesn't need its own log anymore. --- nimble/host/include/host/ble_hs_log.h | 7 +++---- nimble/host/pkg.yml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/nimble/host/include/host/ble_hs_log.h b/nimble/host/include/host/ble_hs_log.h index 6f50c476d..4964755fb 100644 --- a/nimble/host/include/host/ble_hs_log.h +++ b/nimble/host/include/host/ble_hs_log.h @@ -20,17 +20,16 @@ #ifndef H_BLE_HS_LOG_ #define H_BLE_HS_LOG_ -#include "log/log.h" +#include "modlog/modlog.h" + #ifdef __cplusplus extern "C" { #endif struct os_mbuf; -extern struct log ble_hs_log; - #define BLE_HS_LOG(lvl, ...) \ - LOG_ ## lvl(&ble_hs_log, LOG_MODULE_NIMBLE_HOST, __VA_ARGS__) + MODLOG_ ## lvl(LOG_MODULE_NIMBLE_HOST, __VA_ARGS__) #define BLE_HS_LOG_ADDR(lvl, addr) \ BLE_HS_LOG(lvl, "%02x:%02x:%02x:%02x:%02x:%02x", \ diff --git a/nimble/host/pkg.yml b/nimble/host/pkg.yml index 153d13d42..d91454ed8 100644 --- a/nimble/host/pkg.yml +++ b/nimble/host/pkg.yml @@ -27,6 +27,7 @@ pkg.keywords: pkg.deps: - "@apache-mynewt-core/kernel/os" + - "@apache-mynewt-core/sys/log/modlog" - "@apache-mynewt-core/util/mem" - nimble @@ -45,7 +46,6 @@ pkg.deps.BLE_MESH: pkg.req_apis: - ble_transport - console - - log - stats pkg.init: