diff --git a/apps/blemesh/src/main.c b/apps/blemesh/src/main.c index 6e33e4997..24c9950e6 100644 --- a/apps/blemesh/src/main.c +++ b/apps/blemesh/src/main.c @@ -32,8 +32,6 @@ #include "services/gap/ble_svc_gap.h" #include "mesh/glue.h" -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG)) - /* Company ID */ #define CID_VENDOR 0x05C3 #define STANDARD_TEST_ID 0x00 diff --git a/apps/blemesh/syscfg.yml b/apps/blemesh/syscfg.yml index a21783378..383f19237 100644 --- a/apps/blemesh/syscfg.yml +++ b/apps/blemesh/syscfg.yml @@ -35,18 +35,5 @@ syscfg.vals: BLE_MESH_ADV_BUF_COUNT: 20 BLE_MESH_TX_SEG_MAX: 6 - BLE_MESH_DEBUG: 1 - BLE_MESH_DEBUG_NET: 1 - BLE_MESH_DEBUG_TRANS: 1 - BLE_MESH_DEBUG_BEACON: 1 - BLE_MESH_DEBUG_CRYPTO: 1 - BLE_MESH_DEBUG_PROV: 1 - BLE_MESH_DEBUG_ACCESS: 1 - BLE_MESH_DEBUG_MODEL: 1 - BLE_MESH_DEBUG_ADV: 1 - BLE_MESH_DEBUG_LOW_POWER: 1 - BLE_MESH_DEBUG_FRIEND: 1 - BLE_MESH_DEBUG_PROXY: 1 - BLE_MESH_SETTINGS: 0 CONFIG_NFFS: 0 diff --git a/apps/blemesh_models_example_1/syscfg.yml b/apps/blemesh_models_example_1/syscfg.yml index d1cdaa551..969753fe0 100644 --- a/apps/blemesh_models_example_1/syscfg.yml +++ b/apps/blemesh_models_example_1/syscfg.yml @@ -36,16 +36,3 @@ syscfg.vals: BLE_MESH_ADV_BUF_COUNT: 20 BLE_MESH_TX_SEG_MAX: 6 - - BLE_MESH_DEBUG: 0 - BLE_MESH_DEBUG_NET: 0 - BLE_MESH_DEBUG_TRANS: 0 - BLE_MESH_DEBUG_BEACON: 0 - BLE_MESH_DEBUG_CRYPTO: 0 - BLE_MESH_DEBUG_PROV: 0 - BLE_MESH_DEBUG_ACCESS: 0 - BLE_MESH_DEBUG_MODEL: 0 - BLE_MESH_DEBUG_ADV: 0 - BLE_MESH_DEBUG_LOW_POWER: 0 - BLE_MESH_DEBUG_FRIEND: 0 - BLE_MESH_DEBUG_PROXY: 0 diff --git a/apps/blemesh_models_example_2/syscfg.yml b/apps/blemesh_models_example_2/syscfg.yml index 8a9e8238f..b56e9d2d0 100644 --- a/apps/blemesh_models_example_2/syscfg.yml +++ b/apps/blemesh_models_example_2/syscfg.yml @@ -58,16 +58,3 @@ syscfg.vals: BLE_MESH_APP_KEY_COUNT: 2 BLE_MESH_MODEL_GROUP_COUNT: 2 BLE_MESH_LABEL_COUNT: 3 - - BLE_MESH_DEBUG: 0 - BLE_MESH_DEBUG_NET: 0 - BLE_MESH_DEBUG_TRANS: 0 - BLE_MESH_DEBUG_BEACON: 0 - BLE_MESH_DEBUG_CRYPTO: 0 - BLE_MESH_DEBUG_PROV: 0 - BLE_MESH_DEBUG_ACCESS: 0 - BLE_MESH_DEBUG_MODEL: 0 - BLE_MESH_DEBUG_ADV: 0 - BLE_MESH_DEBUG_LOW_POWER: 0 - BLE_MESH_DEBUG_FRIEND: 0 - BLE_MESH_DEBUG_PROXY: 0 diff --git a/apps/blemesh_shell/src/main.c b/apps/blemesh_shell/src/main.c index eb1dfb52a..4ad23e1d8 100644 --- a/apps/blemesh_shell/src/main.c +++ b/apps/blemesh_shell/src/main.c @@ -17,6 +17,8 @@ * under the License. */ +#define MESH_LOG_MODULE BLE_MESH_LOG + #include #include "os/mynewt.h" #include "mesh/mesh.h" diff --git a/apps/blemesh_shell/syscfg.yml b/apps/blemesh_shell/syscfg.yml index 658a9f1f9..14e5f267d 100644 --- a/apps/blemesh_shell/syscfg.yml +++ b/apps/blemesh_shell/syscfg.yml @@ -53,16 +53,3 @@ syscfg.vals: BLE_MESH_CFG_CLI: 1 BLE_MESH_SETTINGS: 0 CONFIG_NFFS: 0 - - BLE_MESH_DEBUG: 0 - BLE_MESH_DEBUG_NET: 0 - BLE_MESH_DEBUG_TRANS: 0 - BLE_MESH_DEBUG_BEACON: 0 - BLE_MESH_DEBUG_CRYPTO: 0 - BLE_MESH_DEBUG_PROV: 0 - BLE_MESH_DEBUG_ACCESS: 0 - BLE_MESH_DEBUG_MODEL: 0 - BLE_MESH_DEBUG_ADV: 0 - BLE_MESH_DEBUG_LOW_POWER: 0 - BLE_MESH_DEBUG_FRIEND: 0 - BLE_MESH_DEBUG_PROXY: 0 diff --git a/apps/bttester/syscfg.yml b/apps/bttester/syscfg.yml index 659cc7bf5..711b57f4a 100644 --- a/apps/bttester/syscfg.yml +++ b/apps/bttester/syscfg.yml @@ -115,17 +115,3 @@ syscfg.vals: BLE_MESH_ADV_BUF_COUNT: 20 BLE_MESH_TX_SEG_MAX: 6 - - BLE_MESH_DEBUG: 0 - BLE_MESH_DEBUG_NET: 0 - BLE_MESH_DEBUG_TRANS: 0 - BLE_MESH_DEBUG_BEACON: 0 - BLE_MESH_DEBUG_CRYPTO: 0 - BLE_MESH_DEBUG_PROV: 0 - BLE_MESH_DEBUG_ACCESS: 0 - BLE_MESH_DEBUG_MODEL: 0 - BLE_MESH_DEBUG_ADV: 0 - BLE_MESH_DEBUG_LOW_POWER: 0 - BLE_MESH_DEBUG_FRIEND: 0 - BLE_MESH_DEBUG_PROXY: 0 - diff --git a/nimble/host/mesh/include/mesh/glue.h b/nimble/host/mesh/include/mesh/glue.h index 59a8e5e94..63fe3a630 100644 --- a/nimble/host/mesh/include/mesh/glue.h +++ b/nimble/host/mesh/include/mesh/glue.h @@ -24,6 +24,8 @@ #include #include "syscfg/syscfg.h" +#include "logcfg/logcfg.h" +#include "modlog/modlog.h" #include "nimble/nimble_npl.h" #include "os/os_mbuf.h" @@ -168,13 +170,19 @@ extern "C" { #define BT_GAP_ADV_SLOW_INT_MIN 0x0640 /* 1 s */ #define BT_GAP_ADV_SLOW_INT_MAX 0x0780 /* 1.2 s */ -#define BT_DBG(fmt, ...) \ - if (BT_DBG_ENABLED) { \ - BLE_HS_LOG(DEBUG, "%s: " fmt "\n", __func__, ## __VA_ARGS__); \ - } -#define BT_INFO(fmt, ...) BLE_HS_LOG(INFO, "%s: " fmt "\n", __func__, ## __VA_ARGS__); -#define BT_WARN(fmt, ...) BLE_HS_LOG(WARN, "%s: " fmt "\n", __func__, ## __VA_ARGS__); -#define BT_ERR(fmt, ...) BLE_HS_LOG(ERROR, "%s: " fmt "\n", __func__, ## __VA_ARGS__); +#ifndef MESH_LOG_MODULE +#define MESH_LOG_MODULE BLE_MESH_LOG +#endif + +#define CAT(a, ...) PRIMITIVE_CAT(a, __VA_ARGS__) +#define PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__ + +#define BLE_MESH_LOG(lvl, ...) CAT(MESH_LOG_MODULE, CAT(_, lvl))(__VA_ARGS__) + +#define BT_DBG(fmt, ...) BLE_MESH_LOG(DEBUG, "%s: " fmt "\n", __func__, ## __VA_ARGS__); +#define BT_INFO(fmt, ...) BLE_MESH_LOG(INFO, "%s: " fmt "\n", __func__, ## __VA_ARGS__); +#define BT_WARN(fmt, ...) BLE_MESH_LOG(WARN, "%s: " fmt "\n", __func__, ## __VA_ARGS__); +#define BT_ERR(fmt, ...) BLE_MESH_LOG(ERROR, "%s: " fmt "\n", __func__, ## __VA_ARGS__); #define BT_GATT_ERR(_att_err) (-(_att_err)) typedef ble_addr_t bt_addr_le_t; diff --git a/nimble/host/mesh/src/access.c b/nimble/host/mesh/src/access.c index a6a12316b..a28e81309 100644 --- a/nimble/host/mesh/src/access.c +++ b/nimble/host/mesh/src/access.c @@ -6,14 +6,13 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include - -#include -#include "mesh/mesh.h" - #include "syscfg/syscfg.h" -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_ACCESS)) -#include "host/ble_hs_log.h" +#define MESH_LOG_MODULE BLE_MESH_ACCESS_LOG + +#include +#include + +#include "mesh/mesh.h" #include "mesh_priv.h" #include "adv.h" diff --git a/nimble/host/mesh/src/adv.c b/nimble/host/mesh/src/adv.c index 20080e0b9..1da2581ca 100644 --- a/nimble/host/mesh/src/adv.c +++ b/nimble/host/mesh/src/adv.c @@ -7,12 +7,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "mesh/mesh.h" - #include "syscfg/syscfg.h" -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_ADV)) -#include "host/ble_hs_log.h" +#define MESH_LOG_MODULE BLE_MESH_ADV_LOG +#include "mesh/mesh.h" #include "host/ble_hs_adv.h" #include "host/ble_gap.h" #include "nimble/hci_common.h" diff --git a/nimble/host/mesh/src/beacon.c b/nimble/host/mesh/src/beacon.c index da909852f..1cb483827 100644 --- a/nimble/host/mesh/src/beacon.c +++ b/nimble/host/mesh/src/beacon.c @@ -6,15 +6,14 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_BEACON_LOG + #include #include #include "os/os_mbuf.h" #include "mesh/mesh.h" -#include "syscfg/syscfg.h" -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_BEACON)) -#include "host/ble_hs_log.h" - #include "adv.h" #include "mesh_priv.h" #include "net.h" diff --git a/nimble/host/mesh/src/cfg_cli.c b/nimble/host/mesh/src/cfg_cli.c index 17f01b993..e664c0f65 100644 --- a/nimble/host/mesh/src/cfg_cli.c +++ b/nimble/host/mesh/src/cfg_cli.c @@ -7,9 +7,9 @@ */ #include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG #if MYNEWT_VAL(BLE_MESH_CFG_CLI) -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL)) #include "mesh/mesh.h" #include diff --git a/nimble/host/mesh/src/cfg_srv.c b/nimble/host/mesh/src/cfg_srv.c index 4ee9e8cfd..fbf9f19a5 100644 --- a/nimble/host/mesh/src/cfg_srv.c +++ b/nimble/host/mesh/src/cfg_srv.c @@ -6,16 +6,15 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG + #include #include #include #include "mesh/mesh.h" -#include "syscfg/syscfg.h" -#define BT_DBG_ENABLED MYNEWT_VAL(BLE_MESH_DEBUG_MODEL) -#include "host/ble_hs_log.h" - #include "mesh_priv.h" #include "adv.h" #include "net.h" diff --git a/nimble/host/mesh/src/crypto.c b/nimble/host/mesh/src/crypto.c index 6227c90d9..f2f87592e 100644 --- a/nimble/host/mesh/src/crypto.c +++ b/nimble/host/mesh/src/crypto.c @@ -6,6 +6,9 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_CRYPTO_LOG + #include #include #include @@ -16,10 +19,6 @@ #include #include -#include "syscfg/syscfg.h" -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_CRYPTO)) -#include "host/ble_hs_log.h" - #include "crypto.h" #define NET_MIC_LEN(pdu) (((pdu)[1] & 0x80) ? 8 : 4) diff --git a/nimble/host/mesh/src/friend.c b/nimble/host/mesh/src/friend.c index a9f25f777..a75f0a901 100644 --- a/nimble/host/mesh/src/friend.c +++ b/nimble/host/mesh/src/friend.c @@ -6,17 +6,15 @@ * SPDX-License-Identifier: Apache-2.0 */ - #include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_CRYPTO_LOG + #if MYNEWT_VAL(BLE_MESH_FRIEND) #include #include #include -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_FRIEND)) -#include "host/ble_hs_log.h" - #include "mesh/mesh.h" #include "mesh/slist.h" #include "mesh_priv.h" diff --git a/nimble/host/mesh/src/glue.c b/nimble/host/mesh/src/glue.c index 2b6289806..aff468ef3 100644 --- a/nimble/host/mesh/src/glue.c +++ b/nimble/host/mesh/src/glue.c @@ -17,6 +17,9 @@ * under the License. */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_LOG + #include "mesh/glue.h" #include "adv.h" #ifndef MYNEWT @@ -27,8 +30,6 @@ #include "base64/base64.h" #endif -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG)) - extern u8_t g_mesh_addr_type; #if MYNEWT_VAL(BLE_EXT_ADV) diff --git a/nimble/host/mesh/src/health_cli.c b/nimble/host/mesh/src/health_cli.c index 68543415c..a35417896 100644 --- a/nimble/host/mesh/src/health_cli.c +++ b/nimble/host/mesh/src/health_cli.c @@ -6,14 +6,13 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG + #include #include #include -#include "syscfg/syscfg.h" -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL)) -#include "host/ble_hs_log.h" - #include "mesh/mesh.h" #include "mesh_priv.h" #include "adv.h" diff --git a/nimble/host/mesh/src/health_srv.c b/nimble/host/mesh/src/health_srv.c index 97e3e043b..d91f840a2 100644 --- a/nimble/host/mesh/src/health_srv.c +++ b/nimble/host/mesh/src/health_srv.c @@ -6,14 +6,13 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG + #include #include #include -#include "syscfg/syscfg.h" -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL)) -#include "host/ble_hs_log.h" - #include "mesh/mesh.h" #include "mesh_priv.h" #include "adv.h" diff --git a/nimble/host/mesh/src/lpn.c b/nimble/host/mesh/src/lpn.c index 0dd00ac6c..2c590dfa5 100644 --- a/nimble/host/mesh/src/lpn.c +++ b/nimble/host/mesh/src/lpn.c @@ -7,14 +7,12 @@ */ #include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_LOW_POWER_LOG #if MYNEWT_VAL(BLE_MESH_LOW_POWER) #include -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_LOW_POWER)) -#include "host/ble_hs_log.h" - #include "mesh/mesh.h" #include "mesh_priv.h" #include "crypto.h" @@ -66,7 +64,7 @@ static void (*lpn_cb)(u16_t friend_addr, bool established); -#if MYNEWT_VAL(BLE_MESH_DEBUG_LOW_POWER) +#if MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) == LOG_LEVEL_DEBUG static const char *state2str(int state) { switch (state) { @@ -92,11 +90,11 @@ static const char *state2str(int state) return "(unknown)"; } } -#endif /* CONFIG_BLUETOOTH_MESH_DEBUG_LPN */ +#endif static inline void lpn_set_state(int state) { -#if MYNEWT_VAL(BLE_MESH_DEBUG_LOW_POWER) +#if MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) == LOG_LEVEL_DEBUG BT_DBG("%s -> %s", state2str(bt_mesh.lpn.state), state2str(state)); #endif bt_mesh.lpn.state = state; @@ -311,7 +309,7 @@ static void req_sent(u16_t duration, int err, void *user_data) { struct bt_mesh_lpn *lpn = &bt_mesh.lpn; -#if BT_DBG_ENABLED +#if MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) == LOG_LEVEL_DEBUG BT_DBG("req 0x%02x duration %u err %d state %s", lpn->sent_req, duration, err, state2str(lpn->state)); #endif @@ -725,7 +723,7 @@ static void lpn_timeout(struct ble_npl_event *work) { struct bt_mesh_lpn *lpn = &bt_mesh.lpn; -#if MYNEWT_VAL(BLE_MESH_DEBUG_LOW_POWER) +#if MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) == LOG_LEVEL_DEBUG BT_DBG("state: %s", state2str(lpn->state)); #endif diff --git a/nimble/host/mesh/src/mesh.c b/nimble/host/mesh/src/mesh.c index 80b638b1f..005e32ed4 100644 --- a/nimble/host/mesh/src/mesh.c +++ b/nimble/host/mesh/src/mesh.c @@ -6,15 +6,14 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_LOG + #include #include #include "os/os_mbuf.h" #include "mesh/mesh.h" - -#include "syscfg/syscfg.h" -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG)) -#include "host/ble_hs_log.h" #include "host/ble_uuid.h" #include "adv.h" @@ -149,14 +148,12 @@ int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers) return -EALREADY; } - if (MYNEWT_VAL(BLE_MESH_DEBUG)) { - char uuid_buf[BLE_UUID_STR_LEN]; - const struct bt_mesh_prov *prov = bt_mesh_prov_get(); - ble_uuid_t *uuid = BLE_UUID128_DECLARE(); + char uuid_buf[BLE_UUID_STR_LEN]; + const struct bt_mesh_prov *prov = bt_mesh_prov_get(); + ble_uuid_t *uuid = BLE_UUID128_DECLARE(); - memcpy(BLE_UUID128(uuid)->value, prov->uuid, 16); - BT_INFO("Device UUID: %s", ble_uuid_to_str(uuid, uuid_buf)); - } + memcpy(BLE_UUID128(uuid)->value, prov->uuid, 16); + BT_INFO("Device UUID: %s", ble_uuid_to_str(uuid, uuid_buf)); if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV) && (bearers & BT_MESH_PROV_ADV)) { diff --git a/nimble/host/mesh/src/model_cli.c b/nimble/host/mesh/src/model_cli.c index c9e9cf622..4f40a88cf 100644 --- a/nimble/host/mesh/src/model_cli.c +++ b/nimble/host/mesh/src/model_cli.c @@ -4,9 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL)) +#include "mesh/mesh.h" #include "mesh/model_cli.h" #include "mesh_priv.h" diff --git a/nimble/host/mesh/src/model_srv.c b/nimble/host/mesh/src/model_srv.c index 0d9618d2b..0ac40c8cc 100644 --- a/nimble/host/mesh/src/model_srv.c +++ b/nimble/host/mesh/src/model_srv.c @@ -4,10 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_MODEL_LOG + #include "mesh/mesh.h" - -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_MODEL)) - #include "mesh/model_srv.h" #include "mesh_priv.h" diff --git a/nimble/host/mesh/src/net.c b/nimble/host/mesh/src/net.c index 81a683194..2b0d1064a 100644 --- a/nimble/host/mesh/src/net.c +++ b/nimble/host/mesh/src/net.c @@ -6,6 +6,9 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_NET_LOG + #include #include #include @@ -13,10 +16,6 @@ #include "os/os_mbuf.h" #include "mesh/mesh.h" -#include "syscfg/syscfg.h" -#define BT_DBG_ENABLED MYNEWT_VAL(BLE_MESH_DEBUG_NET) -#include "host/ble_hs_log.h" - #include "crypto.h" #include "adv.h" #include "mesh_priv.h" diff --git a/nimble/host/mesh/src/prov.c b/nimble/host/mesh/src/prov.c index 4e569ac63..36ae182dc 100644 --- a/nimble/host/mesh/src/prov.c +++ b/nimble/host/mesh/src/prov.c @@ -5,14 +5,14 @@ * * SPDX-License-Identifier: Apache-2.0 */ + #include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_PROV_LOG + #if MYNEWT_VAL(BLE_MESH_PROV) #include -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_PROV)) -#include "host/ble_hs_log.h" - #include "mesh/mesh.h" #include "mesh_priv.h" diff --git a/nimble/host/mesh/src/proxy.c b/nimble/host/mesh/src/proxy.c index f6ba1d892..2134bddcf 100644 --- a/nimble/host/mesh/src/proxy.c +++ b/nimble/host/mesh/src/proxy.c @@ -7,13 +7,11 @@ */ #include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_PROXY_LOG #if MYNEWT_VAL(BLE_MESH_PROXY) #include "mesh/mesh.h" - -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_PROXY)) -#include "host/ble_hs_log.h" #include "host/ble_att.h" #include "services/gatt/ble_svc_gatt.h" #include "../../host/src/ble_hs_priv.h" diff --git a/nimble/host/mesh/src/settings.c b/nimble/host/mesh/src/settings.c index f0f4a27ea..ac7e856bf 100644 --- a/nimble/host/mesh/src/settings.c +++ b/nimble/host/mesh/src/settings.c @@ -5,11 +5,10 @@ */ #include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_SETTINGS_LOG #if MYNEWT_VAL(BLE_MESH_SETTINGS) -#define BT_DBG_ENABLED MYNEWT_VAL(BLE_MESH_DEBUG_SETTINGS) - #include "mesh/mesh.h" #include "mesh/glue.h" #include "net.h" diff --git a/nimble/host/mesh/src/transport.c b/nimble/host/mesh/src/transport.c index 949c29cf5..0282a15dd 100644 --- a/nimble/host/mesh/src/transport.c +++ b/nimble/host/mesh/src/transport.c @@ -6,6 +6,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "syscfg/syscfg.h" +#define MESH_LOG_MODULE BLE_MESH_TRANS_LOG #include #include @@ -13,10 +15,6 @@ #include "mesh/mesh.h" #include "mesh_priv.h" -#include "syscfg/syscfg.h" -#define BT_DBG_ENABLED (MYNEWT_VAL(BLE_MESH_DEBUG_TRANS)) -#include "host/ble_hs_log.h" - #include "crypto.h" #include "adv.h" #include "net.h" diff --git a/nimble/host/mesh/syscfg.yml b/nimble/host/mesh/syscfg.yml index 368e2b259..88747b3d6 100644 --- a/nimble/host/mesh/syscfg.yml +++ b/nimble/host/mesh/syscfg.yml @@ -347,82 +347,6 @@ syscfg.defs: the console. value: 0 - BLE_MESH_DEBUG: - description: > - Use this option to enable debug logs for the Bluetooth - Mesh functionality. - value: 0 - - BLE_MESH_DEBUG_NET: - description: > - Use this option to enable Network layer debug logs for the - Bluetooth Mesh functionality. - value: 0 - - BLE_MESH_DEBUG_TRANS: - description: > - Use this option to enable Transport layer debug logs for the - Bluetooth Mesh functionality. - value: 0 - - BLE_MESH_DEBUG_BEACON: - description: > - Use this option to enable Beacon-related debug logs for the - Bluetooth Mesh functionality. - value: 0 - - BLE_MESH_DEBUG_CRYPTO: - description: > - Use this option to enable cryptographic debug logs for the - Bluetooth Mesh functionality. - value: 0 - - BLE_MESH_DEBUG_PROV: - description: > - Use this option to enable Provisioning debug logs for the - Bluetooth Mesh functionality. - value: 0 - - BLE_MESH_DEBUG_ACCESS: - description: > - Use this option to enable Access layer and device composition - related debug logs for Bluetooth Mesh. - value: 0 - - BLE_MESH_DEBUG_MODEL: - description: > - Use this option to enable debug logs for the Foundation - Models. - value: 0 - - BLE_MESH_DEBUG_ADV: - description: > - Use this option to enable advertising debug logs for - the Bluetooth Mesh functionality. - value: 0 - - BLE_MESH_DEBUG_LOW_POWER: - description: > - Use this option to enable Low Power debug logs for the - Bluetooth Mesh functionality. - value: 0 - - BLE_MESH_DEBUG_FRIEND: - description: > - Use this option to enable Friend debug logs for the - Bluetooth Mesh functionality. - value: 0 - - BLE_MESH_DEBUG_PROXY: - description: > - Use this option to enable Proxy protocol debug logs. - value: 0 - - BLE_MESH_DEBUG_SETTINGS: - description: > - Use this option to enable persistent settings debug logs. - value: 1 - BLE_MESH_IV_UPDATE_TEST: description: > This option removes the 96 hour limit of the IV Update @@ -530,6 +454,178 @@ syscfg.defs: Secondary sysinit stage for BLE mesh functionality. value: 1000 + ### Log settings. + + BLE_MESH_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh log messages. + value: 9 + BLE_MESH_LOG_LVL: + description: > + Minimum level for the BLE Mesh log. + value: 1 + + BLE_MESH_ACCESS_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh Access-related log messages. + value: 10 + BLE_MESH_ACCESS_LOG_LVL: + description: > + Minimum level for the BLE Mesh Access-related log. + value: 1 + + BLE_MESH_ADV_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh advertising log messages. + value: 11 + BLE_MESH_ADV_LOG_LVL: + description: > + Minimum level for the BLE Mesh log. + value: 1 + + BLE_MESH_BEACON_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh Beacon-related log messages. + value: 12 + BLE_MESH_BEACON_LOG_LVL: + description: > + Minimum level for the BLE Mesh Beacon-related log. + value: 1 + + BLE_MESH_CRYPTO_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh cryptographic log messages. + value: 13 + BLE_MESH_CRYPTO_LOG_LVL: + description: > + Minimum level for the BLE Mesh cryptographic log. + value: 1 + + BLE_MESH_FRIEND_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh Friend log messages. + value: 14 + BLE_MESH_FRIEND_LOG_LVL: + description: > + Minimum level for the BLE Mesh Friend log. + value: 1 + + BLE_MESH_LOW_POWER_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh Low Power log messages. + value: 15 + BLE_MESH_LOW_POWER_LOG_LVL: + description: > + Minimum level for the BLE Mesh Low Power log. + value: 1 + + BLE_MESH_MODEL_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh Foundation Models log messages. + value: 16 + BLE_MESH_MODEL_LOG_LVL: + description: > + Minimum level for the BLE Mesh Foundation Models log. + value: 1 + + BLE_MESH_NET_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh Network layer log messages. + value: 17 + BLE_MESH_NET_LOG_LVL: + description: > + Minimum level for the BLE Mesh Network layer log. + value: 1 + + BLE_MESH_PROV_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh Provisioning log messages. + value: 18 + BLE_MESH_PROV_LOG_LVL: + description: > + Minimum level for the BLE Mesh Provisioning log. + value: 1 + + BLE_MESH_PROXY_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh Proxy protocol log messages. + value: 19 + BLE_MESH_PROXY_LOG_LVL: + description: > + Minimum level for the BLE Mesh Proxy protocol log. + value: 1 + + BLE_MESH_SETTINGS_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh persistent settings log messages. + value: 20 + BLE_MESH_SETTINGS_LOG_LVL: + description: > + Minimum level for the BLE Mesh persistent settings log. + value: 1 + + BLE_MESH_TRANS_LOG_MOD: + description: > + Numeric module ID to use for BLE Mesh Transport Layer log messages. + value: 21 + BLE_MESH_TRANS_LOG_LVL: + description: > + Minimum level for the BLE Mesh Transport Layer log. + value: 1 + +syscfg.logs: + BLE_MESH_LOG: + module: MYNEWT_VAL(BLE_MESH_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_LOG_LVL) + + BLE_MESH_ACCESS_LOG: + module: MYNEWT_VAL(BLE_MESH_ACCESS_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_ACCESS_LOG_LVL) + + BLE_MESH_ADV_LOG: + module: MYNEWT_VAL(BLE_MESH_ADV_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_ADV_LOG_LVL) + + BLE_MESH_BEACON_LOG: + module: MYNEWT_VAL(BLE_MESH_BEACON_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_BEACON_LOG_LVL) + + BLE_MESH_CRYPTO_LOG: + module: MYNEWT_VAL(BLE_MESH_CRYPTO_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_CRYPTO_LOG_LVL) + + BLE_MESH_FRIEND_LOG: + module: MYNEWT_VAL(BLE_MESH_FRIEND_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_FRIEND_LOG_LVL) + + BLE_MESH_LOW_POWER_LOG: + module: MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_LOW_POWER_LOG_LVL) + + BLE_MESH_MODEL_LOG: + module: MYNEWT_VAL(BLE_MESH_MODEL_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_MODEL_LOG_LVL) + + BLE_MESH_NET_LOG: + module: MYNEWT_VAL(BLE_MESH_NET_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_NET_LOG_LVL) + + BLE_MESH_PROV_LOG: + module: MYNEWT_VAL(BLE_MESH_PROV_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_PROV_LOG_LVL) + + BLE_MESH_PROXY_LOG: + module: MYNEWT_VAL(BLE_MESH_PROXY_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_PROXY_LOG_LVL) + + BLE_MESH_SETTINGS_LOG: + module: MYNEWT_VAL(BLE_MESH_SETTINGS_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_SETTINGS_LOG_LVL) + + BLE_MESH_TRANS_LOG: + module: MYNEWT_VAL(BLE_MESH_TRANS_LOG_MOD) + level: MYNEWT_VAL(BLE_MESH_TRANS_LOG_LVL) + syscfg.vals.BLE_MESH_SHELL: BLE_MESH_CFG_CLI: 1 BLE_MESH_HEALTH_CLI: 1 diff --git a/porting/examples/linux_blemesh/include/logcfg/logcfg.h b/porting/examples/linux_blemesh/include/logcfg/logcfg.h index e21a3ae54..7404dbb45 100644 --- a/porting/examples/linux_blemesh/include/logcfg/logcfg.h +++ b/porting/examples/linux_blemesh/include/logcfg/logcfg.h @@ -15,6 +15,97 @@ #define BLE_HS_LOG_CRITICAL(...) MODLOG_CRITICAL(4, __VA_ARGS__) #define BLE_HS_LOG_DISABLED(...) MODLOG_DISABLED(4, __VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_INFO(...) MODLOG_INFO(10, __VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_WARN(...) MODLOG_WARN(10, __VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_ERROR(...) MODLOG_ERROR(10, __VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_CRITICAL(...) MODLOG_CRITICAL(10, __VA_ARGS__) +#define BLE_MESH_ACCESS_LOG_DISABLED(...) MODLOG_DISABLED(10, __VA_ARGS__) + +#define BLE_MESH_ADV_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_ADV_LOG_INFO(...) MODLOG_INFO(11, __VA_ARGS__) +#define BLE_MESH_ADV_LOG_WARN(...) MODLOG_WARN(11, __VA_ARGS__) +#define BLE_MESH_ADV_LOG_ERROR(...) MODLOG_ERROR(11, __VA_ARGS__) +#define BLE_MESH_ADV_LOG_CRITICAL(...) MODLOG_CRITICAL(11, __VA_ARGS__) +#define BLE_MESH_ADV_LOG_DISABLED(...) MODLOG_DISABLED(11, __VA_ARGS__) + +#define BLE_MESH_BEACON_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_BEACON_LOG_INFO(...) MODLOG_INFO(12, __VA_ARGS__) +#define BLE_MESH_BEACON_LOG_WARN(...) MODLOG_WARN(12, __VA_ARGS__) +#define BLE_MESH_BEACON_LOG_ERROR(...) MODLOG_ERROR(12, __VA_ARGS__) +#define BLE_MESH_BEACON_LOG_CRITICAL(...) MODLOG_CRITICAL(12, __VA_ARGS__) +#define BLE_MESH_BEACON_LOG_DISABLED(...) MODLOG_DISABLED(12, __VA_ARGS__) + +#define BLE_MESH_CRYPTO_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_INFO(...) MODLOG_INFO(13, __VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_WARN(...) MODLOG_WARN(13, __VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_ERROR(...) MODLOG_ERROR(13, __VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_CRITICAL(...) MODLOG_CRITICAL(13, __VA_ARGS__) +#define BLE_MESH_CRYPTO_LOG_DISABLED(...) MODLOG_DISABLED(13, __VA_ARGS__) + +#define BLE_MESH_FRIEND_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_INFO(...) MODLOG_INFO(14, __VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_WARN(...) MODLOG_WARN(14, __VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_ERROR(...) MODLOG_ERROR(14, __VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_CRITICAL(...) MODLOG_CRITICAL(14, __VA_ARGS__) +#define BLE_MESH_FRIEND_LOG_DISABLED(...) MODLOG_DISABLED(14, __VA_ARGS__) + +#define BLE_MESH_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_LOG_INFO(...) MODLOG_INFO(9, __VA_ARGS__) +#define BLE_MESH_LOG_WARN(...) MODLOG_WARN(9, __VA_ARGS__) +#define BLE_MESH_LOG_ERROR(...) MODLOG_ERROR(9, __VA_ARGS__) +#define BLE_MESH_LOG_CRITICAL(...) MODLOG_CRITICAL(9, __VA_ARGS__) +#define BLE_MESH_LOG_DISABLED(...) MODLOG_DISABLED(9, __VA_ARGS__) + +#define BLE_MESH_LOW_POWER_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_INFO(...) MODLOG_INFO(15, __VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_WARN(...) MODLOG_WARN(15, __VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_ERROR(...) MODLOG_ERROR(15, __VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_CRITICAL(...) MODLOG_CRITICAL(15, __VA_ARGS__) +#define BLE_MESH_LOW_POWER_LOG_DISABLED(...) MODLOG_DISABLED(15, __VA_ARGS__) + +#define BLE_MESH_MODEL_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_MODEL_LOG_INFO(...) MODLOG_INFO(16, __VA_ARGS__) +#define BLE_MESH_MODEL_LOG_WARN(...) MODLOG_WARN(16, __VA_ARGS__) +#define BLE_MESH_MODEL_LOG_ERROR(...) MODLOG_ERROR(16, __VA_ARGS__) +#define BLE_MESH_MODEL_LOG_CRITICAL(...) MODLOG_CRITICAL(16, __VA_ARGS__) +#define BLE_MESH_MODEL_LOG_DISABLED(...) MODLOG_DISABLED(16, __VA_ARGS__) + +#define BLE_MESH_NET_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_NET_LOG_INFO(...) MODLOG_INFO(17, __VA_ARGS__) +#define BLE_MESH_NET_LOG_WARN(...) MODLOG_WARN(17, __VA_ARGS__) +#define BLE_MESH_NET_LOG_ERROR(...) MODLOG_ERROR(17, __VA_ARGS__) +#define BLE_MESH_NET_LOG_CRITICAL(...) MODLOG_CRITICAL(17, __VA_ARGS__) +#define BLE_MESH_NET_LOG_DISABLED(...) MODLOG_DISABLED(17, __VA_ARGS__) + +#define BLE_MESH_PROV_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_PROV_LOG_INFO(...) MODLOG_INFO(18, __VA_ARGS__) +#define BLE_MESH_PROV_LOG_WARN(...) MODLOG_WARN(18, __VA_ARGS__) +#define BLE_MESH_PROV_LOG_ERROR(...) MODLOG_ERROR(18, __VA_ARGS__) +#define BLE_MESH_PROV_LOG_CRITICAL(...) MODLOG_CRITICAL(18, __VA_ARGS__) +#define BLE_MESH_PROV_LOG_DISABLED(...) MODLOG_DISABLED(18, __VA_ARGS__) + +#define BLE_MESH_PROXY_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_PROXY_LOG_INFO(...) MODLOG_INFO(19, __VA_ARGS__) +#define BLE_MESH_PROXY_LOG_WARN(...) MODLOG_WARN(19, __VA_ARGS__) +#define BLE_MESH_PROXY_LOG_ERROR(...) MODLOG_ERROR(19, __VA_ARGS__) +#define BLE_MESH_PROXY_LOG_CRITICAL(...) MODLOG_CRITICAL(19, __VA_ARGS__) +#define BLE_MESH_PROXY_LOG_DISABLED(...) MODLOG_DISABLED(19, __VA_ARGS__) + +#define BLE_MESH_SETTINGS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_INFO(...) MODLOG_INFO(20, __VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_WARN(...) MODLOG_WARN(20, __VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_ERROR(...) MODLOG_ERROR(20, __VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_CRITICAL(...) MODLOG_CRITICAL(20, __VA_ARGS__) +#define BLE_MESH_SETTINGS_LOG_DISABLED(...) MODLOG_DISABLED(20, __VA_ARGS__) + +#define BLE_MESH_TRANS_LOG_DEBUG(...) IGNORE(__VA_ARGS__) +#define BLE_MESH_TRANS_LOG_INFO(...) MODLOG_INFO(21, __VA_ARGS__) +#define BLE_MESH_TRANS_LOG_WARN(...) MODLOG_WARN(21, __VA_ARGS__) +#define BLE_MESH_TRANS_LOG_ERROR(...) MODLOG_ERROR(21, __VA_ARGS__) +#define BLE_MESH_TRANS_LOG_CRITICAL(...) MODLOG_CRITICAL(21, __VA_ARGS__) +#define BLE_MESH_TRANS_LOG_DISABLED(...) MODLOG_DISABLED(21, __VA_ARGS__) + #define DFLT_LOG_DEBUG(...) IGNORE(__VA_ARGS__) #define DFLT_LOG_INFO(...) MODLOG_INFO(0, __VA_ARGS__) #define DFLT_LOG_WARN(...) MODLOG_WARN(0, __VA_ARGS__) diff --git a/porting/examples/linux_blemesh/include/syscfg/syscfg.h b/porting/examples/linux_blemesh/include/syscfg/syscfg.h index 77a9a7db6..71b05cb70 100644 --- a/porting/examples/linux_blemesh/include/syscfg/syscfg.h +++ b/porting/examples/linux_blemesh/include/syscfg/syscfg.h @@ -741,11 +741,27 @@ #endif /*** @apache-mynewt-nimble/nimble/host/mesh */ +#ifndef MYNEWT_VAL_BLE_MESH_ACCESS_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_ACCESS_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_ACCESS_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_ACCESS_LOG_MOD (10) +#endif + /* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ #ifndef MYNEWT_VAL_BLE_MESH_ADV_BUF_COUNT #define MYNEWT_VAL_BLE_MESH_ADV_BUF_COUNT (20) #endif +#ifndef MYNEWT_VAL_BLE_MESH_ADV_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_ADV_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_ADV_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_ADV_LOG_MOD (11) +#endif + #ifndef MYNEWT_VAL_BLE_MESH_ADV_TASK_PRIO #define MYNEWT_VAL_BLE_MESH_ADV_TASK_PRIO (9) #endif @@ -755,6 +771,14 @@ #define MYNEWT_VAL_BLE_MESH_APP_KEY_COUNT (4) #endif +#ifndef MYNEWT_VAL_BLE_MESH_BEACON_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_BEACON_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_BEACON_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_BEACON_LOG_MOD (12) +#endif + /* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ #ifndef MYNEWT_VAL_BLE_MESH_CFG_CLI #define MYNEWT_VAL_BLE_MESH_CFG_CLI (1) @@ -764,56 +788,12 @@ #define MYNEWT_VAL_BLE_MESH_CRPL (10) #endif -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG -#define MYNEWT_VAL_BLE_MESH_DEBUG (0) +#ifndef MYNEWT_VAL_BLE_MESH_CRYPTO_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_CRYPTO_LOG_LVL (1) #endif -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_ACCESS -#define MYNEWT_VAL_BLE_MESH_DEBUG_ACCESS (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_ADV -#define MYNEWT_VAL_BLE_MESH_DEBUG_ADV (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_BEACON -#define MYNEWT_VAL_BLE_MESH_DEBUG_BEACON (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_CRYPTO -#define MYNEWT_VAL_BLE_MESH_DEBUG_CRYPTO (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_FRIEND -#define MYNEWT_VAL_BLE_MESH_DEBUG_FRIEND (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_LOW_POWER -#define MYNEWT_VAL_BLE_MESH_DEBUG_LOW_POWER (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_MODEL -#define MYNEWT_VAL_BLE_MESH_DEBUG_MODEL (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_NET -#define MYNEWT_VAL_BLE_MESH_DEBUG_NET (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_PROV -#define MYNEWT_VAL_BLE_MESH_DEBUG_PROV (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_PROXY -#define MYNEWT_VAL_BLE_MESH_DEBUG_PROXY (0) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_SETTINGS -#define MYNEWT_VAL_BLE_MESH_DEBUG_SETTINGS (1) -#endif - -#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_TRANS -#define MYNEWT_VAL_BLE_MESH_DEBUG_TRANS (0) +#ifndef MYNEWT_VAL_BLE_MESH_CRYPTO_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_CRYPTO_LOG_MOD (13) #endif #ifndef MYNEWT_VAL_BLE_MESH_DEVICE_NAME @@ -829,6 +809,14 @@ #define MYNEWT_VAL_BLE_MESH_FRIEND (1) #endif +#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_FRIEND_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_FRIEND_LOG_MOD (14) +#endif + #ifndef MYNEWT_VAL_BLE_MESH_FRIEND_LPN_COUNT #define MYNEWT_VAL_BLE_MESH_FRIEND_LPN_COUNT (2) #endif @@ -872,11 +860,27 @@ #define MYNEWT_VAL_BLE_MESH_LABEL_COUNT (2) #endif +#ifndef MYNEWT_VAL_BLE_MESH_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_LOG_MOD (9) +#endif + /* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ #ifndef MYNEWT_VAL_BLE_MESH_LOW_POWER #define MYNEWT_VAL_BLE_MESH_LOW_POWER (1) #endif +#ifndef MYNEWT_VAL_BLE_MESH_LOW_POWER_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_LOW_POWER_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LOW_POWER_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_LOW_POWER_LOG_MOD (15) +#endif + /* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ #ifndef MYNEWT_VAL_BLE_MESH_LPN_AUTO #define MYNEWT_VAL_BLE_MESH_LPN_AUTO (0) @@ -935,10 +939,26 @@ #define MYNEWT_VAL_BLE_MESH_MODEL_KEY_COUNT (1) #endif +#ifndef MYNEWT_VAL_BLE_MESH_MODEL_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_MODEL_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_MODEL_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_MODEL_LOG_MOD (16) +#endif + #ifndef MYNEWT_VAL_BLE_MESH_MSG_CACHE_SIZE #define MYNEWT_VAL_BLE_MESH_MSG_CACHE_SIZE (10) #endif +#ifndef MYNEWT_VAL_BLE_MESH_NET_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_NET_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_NET_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_NET_LOG_MOD (17) +#endif + #ifndef MYNEWT_VAL_BLE_MESH_NODE_ID_TIMEOUT #define MYNEWT_VAL_BLE_MESH_NODE_ID_TIMEOUT (60) #endif @@ -974,6 +994,14 @@ #define MYNEWT_VAL_BLE_MESH_PROV (1) #endif +#ifndef MYNEWT_VAL_BLE_MESH_PROV_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_PROV_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_PROV_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_PROV_LOG_MOD (18) +#endif + /* Overridden by @apache-mynewt-nimble/nimble/host/mesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ #ifndef MYNEWT_VAL_BLE_MESH_PROXY #define MYNEWT_VAL_BLE_MESH_PROXY (1) @@ -983,6 +1011,14 @@ #define MYNEWT_VAL_BLE_MESH_PROXY_FILTER_SIZE (1) #endif +#ifndef MYNEWT_VAL_BLE_MESH_PROXY_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_PROXY_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_PROXY_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_PROXY_LOG_MOD (19) +#endif + /* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ #ifndef MYNEWT_VAL_BLE_MESH_RELAY #define MYNEWT_VAL_BLE_MESH_RELAY (1) @@ -1013,6 +1049,14 @@ #define MYNEWT_VAL_BLE_MESH_SETTINGS (0) #endif +#ifndef MYNEWT_VAL_BLE_MESH_SETTINGS_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_SETTINGS_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_SETTINGS_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_SETTINGS_LOG_MOD (20) +#endif + /* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ #ifndef MYNEWT_VAL_BLE_MESH_SHELL #define MYNEWT_VAL_BLE_MESH_SHELL (0) @@ -1044,6 +1088,14 @@ #define MYNEWT_VAL_BLE_MESH_TESTING (1) #endif +#ifndef MYNEWT_VAL_BLE_MESH_TRANS_LOG_LVL +#define MYNEWT_VAL_BLE_MESH_TRANS_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_TRANS_LOG_MOD +#define MYNEWT_VAL_BLE_MESH_TRANS_LOG_MOD (21) +#endif + /* Overridden by @apache-mynewt-nimble/targets/linux_blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ #ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_MAX #define MYNEWT_VAL_BLE_MESH_TX_SEG_MAX (6)