From 65175f2e49fd42ce6f5be8947357b79008186d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Narajowski?= Date: Tue, 12 Nov 2019 16:30:58 +0100 Subject: [PATCH] nimble/host: Remove BLE_HS_LOG_* defines These defines were left out for compatibility but as we move porting examples to use generated LOG macros we have to remove these. --- nimble/host/include/host/ble_hs_log.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/nimble/host/include/host/ble_hs_log.h b/nimble/host/include/host/ble_hs_log.h index 42e4dcce8..8d0a4596e 100644 --- a/nimble/host/include/host/ble_hs_log.h +++ b/nimble/host/include/host/ble_hs_log.h @@ -21,8 +21,10 @@ #define H_BLE_HS_LOG_ #include "modlog/modlog.h" -#if MYNEWT -#include "os/mynewt.h" + +/* Only include the logcfg header if this version of newt can generate it. */ +#if MYNEWT_VAL(NEWT_FEATURE_LOGCFG) +#include "logcfg/logcfg.h" #endif #ifdef __cplusplus @@ -31,20 +33,6 @@ extern "C" { struct os_mbuf; -/* Logging macros are generated automatically for Mynewt. Define them here for - * other OSes. - */ -#if !MYNEWT - -#define BLE_HS_LOG_DEBUG(...) MODLOG_DEBUG(LOG_MODULE_NIMBLE_HOST, __VA_ARGS__) -#define BLE_HS_LOG_INFO(...) MODLOG_INFO(LOG_MODULE_NIMBLE_HOST, __VA_ARGS__) -#define BLE_HS_LOG_WARN(...) MODLOG_WARN(LOG_MODULE_NIMBLE_HOST, __VA_ARGS__) -#define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(LOG_MODULE_NIMBLE_HOST, __VA_ARGS__) -#define BLE_HS_LOG_CRITICAL(...) \ - MODLOG_CRITICAL(LOG_MODULE_NIMBLE_HOST, __VA_ARGS__) - -#endif - #define BLE_HS_LOG(lvl, ...) \ BLE_HS_LOG_ ## lvl(__VA_ARGS__)