Bluetooth: Move all logs behind CONFIG_BLUETOOTH_DEBUG

The BLUETOOTH_DEBUG config option bumps the stack sizes to cope with
printf requirements. Since all the logs use printf now they should
only be available with the bigger stack sizes to avoid surprises.
There are still basically two levels of log enabling where
BLUETOOTH_DEBUG enables the ERR/WARN/INFO everywhere and the
BLUETOOTH_DEBUG_* enables BT_DBG for a specific subset of the stack.

Change-Id: Ie8d64e47f44485efde32b40cd5bb34389c8e39da
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-05-21 11:35:42 +03:00 committed by Anas Nashif
commit 6e20c3b838

View file

@ -40,13 +40,15 @@
#if defined(CONFIG_BLUETOOTH_DEBUG)
#define BT_DBG(fmt, ...) printf("bt: %s (%p): " fmt, __func__, \
context_self_get(), ##__VA_ARGS__)
#else
#define BT_DBG(fmt, ...)
#endif /* CONFIG_BLUETOOTH_DEBUG */
#define BT_ERR(fmt, ...) printf("bt: %s: " fmt, __func__, ##__VA_ARGS__)
#define BT_WARN(fmt, ...) printf("bt: %s: " fmt, __func__, ##__VA_ARGS__)
#define BT_INFO(fmt, ...) printf("bt: " fmt, ##__VA_ARGS__)
#else
#define BT_DBG(fmt, ...)
#define BT_ERR(fmt, ...)
#define BT_WARN(fmt, ...)
#define BT_INFO(fmt, ...)
#endif /* CONFIG_BLUETOOTH_DEBUG */
/* HCI control APIs */