mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-04-06 17:23:16 +02:00
Use ESP Logging Macros for webapi
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
// 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 "WebApi.h"
|
||||
#include "Configuration.h"
|
||||
#include "MessageOutput.h"
|
||||
#include "defaults.h"
|
||||
#include <AsyncJson.h>
|
||||
|
||||
#undef TAG
|
||||
static const char* TAG = "webapi";
|
||||
|
||||
WebApiClass::WebApiClass()
|
||||
: _server(HTTP_PORT)
|
||||
{
|
||||
@@ -138,7 +140,7 @@ bool WebApiClass::sendJsonResponse(AsyncWebServerRequest* request, AsyncJsonResp
|
||||
root["code"] = WebApiError::GenericInternalServerError;
|
||||
root["type"] = "danger";
|
||||
response->setCode(500);
|
||||
MessageOutput.printf("WebResponse failed: %s, %" PRIu16 "\n", function, line);
|
||||
ESP_LOGE(TAG, "WebResponse failed: %s, %" PRIu16 "", function, line);
|
||||
ret_val = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user