Use ESP Logging Macros for utils

This commit is contained in:
Thomas Basler
2025-04-18 16:51:15 +02:00
parent dd646aebff
commit 77eff68c5f

View File

@@ -1,14 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2022 - 2024 Thomas Basler and others
* Copyright (C) 2022-2025 Thomas Basler and others
*/
#include "Utils.h"
#include "MessageOutput.h"
#include "PinMapping.h"
#include <LittleFS.h>
#include <MD5Builder.h>
#undef TAG
static const char* TAG = "utils";
uint32_t Utils::getChipId()
{
uint32_t chipId = 0;
@@ -61,7 +63,7 @@ int Utils::getTimezoneOffset()
bool Utils::checkJsonAlloc(const JsonDocument& doc, const char* function, const uint16_t line)
{
if (doc.overflowed()) {
MessageOutput.printf("Alloc failed: %s, %" PRIu16 "\n", function, line);
ESP_LOGE(TAG, "Alloc failed: %s, %" PRIu16 "", function, line);
return false;
}