espressif / esp-nimble

A fork of NimBLE stack, for use with ESP32 and ESP-IDF
Apache License 2.0
76 stars 49 forks source link

LOG_LEVEL defines collision #49

Open vovagorodok opened 1 year ago

vovagorodok commented 1 year ago

At log_common.h we have defined:

#define LOG_LEVEL_DEBUG    (0)
#define LOG_LEVEL_INFO     (1)
#define LOG_LEVEL_WARN     (2)
#define LOG_LEVEL_ERROR    (3)
#define LOG_LEVEL_CRITICAL (4)
#define LOG_LEVEL_NONE     (5)

LOG_LEVEL.. names are very common and I have redefinition issues when another than NibBle logger is used.\ Because its internal NibBle logger, proposed to use some internal names like: BLE_LOG_LEVEL.. or NIM_BLE_LOG_LEVEL..

rahult-github commented 1 year ago

Hi @vovagorodok ,

ESP-IDF clones upstream mynewt-nimble and we try to be in sync with upstream code. This file is actually coming from upstream nimble code. i suggest you to also open a ticket here .

Thanks, Rahul

vovagorodok commented 1 year ago

Done, lets wait for response: https://github.com/apache/mynewt-nimble/issues/1416

vovagorodok commented 9 months ago

Hi, done from apache side. Lets align esp-nimble repo now :)

vovagorodok commented 7 months ago

@rahult-github what plans on this topic?

Staars commented 6 months ago

I have the exact same problems with colliding defines and would like to see this solved.

vovagorodok commented 3 months ago

@rahult-github there is some issue with merging upstream? Can I help somehow?

rahult-github commented 3 months ago

Hi @vovagorodok , sorry for delay.

Current nimble version of IDF is 1.5.0 .. Backporting the patch to this branch has more changes than anticipated. We are in process of migrating to IDF 1.6.0. So the patch will be applied once we migrate. Also, we will backport it for nimble-1.5.0-idf too. Will update here soon for this.

In meantime, i will rework on the backporting of the patch and share it here for your usage, that will help unblock you untill it makes way to official IDF github code