Refactored use of LOG_X(LOG_TAG, ...) to log_x(...) (#2672)

* Replaced ARDUINO_VARIANT with const char

* Fixed missing return value

* Added quotes around defined value in macro (Issue #2193)

* Change logging from Error to Verbose when not found and default available

* Move Enter and Exit logging to Verbose Level

* Refactored LOG_X() into log_x()
This commit is contained in:
Bascy
2019-04-15 17:26:35 +02:00
committed by Me No Dev
parent af23d0bb10
commit 01d7ea7b80
21 changed files with 399 additions and 530 deletions

View File

@ -7,7 +7,7 @@
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#include <string.h>
#include <esp_log.h>
#include "esp32-hal-log.h"
#include "BLEEddystoneURL.h"
static const char LOG_TAG[] = "BLEEddystoneURL";
@ -118,7 +118,7 @@ std::string BLEEddystoneURL::getDecodedURL() {
*/
void BLEEddystoneURL::setData(std::string data) {
if (data.length() > sizeof(m_eddystoneData)) {
ESP_LOGE(LOG_TAG, "Unable to set the data ... length passed in was %d and max expected %d", data.length(), sizeof(m_eddystoneData));
log_e("Unable to set the data ... length passed in was %d and max expected %d", data.length(), sizeof(m_eddystoneData));
return;
}
memset(&m_eddystoneData, 0, sizeof(m_eddystoneData));
@ -136,7 +136,7 @@ void BLEEddystoneURL::setPower(int8_t advertisedTxPower) {
void BLEEddystoneURL::setURL(std::string url) {
if (url.length() > sizeof(m_eddystoneData.url)) {
ESP_LOGE(LOG_TAG, "Unable to set the url ... length passed in was %d and max expected %d", url.length(), sizeof(m_eddystoneData.url));
log_e("Unable to set the url ... length passed in was %d and max expected %d", url.length(), sizeof(m_eddystoneData.url));
return;
}
memset(m_eddystoneData.url, 0, sizeof(m_eddystoneData.url));