Log levels refactoring

This commit is contained in:
Ben Meadors
2022-12-29 20:41:37 -06:00
parent 979d12d607
commit 0b5cae5393
90 changed files with 1053 additions and 1051 deletions

View File

@@ -9,14 +9,14 @@ void initApiServer(int port)
// Start API server on port 4403
if (!apiPort) {
apiPort = new ethServerPort(port);
DEBUG_MSG("API server listening on TCP port %d\n", port);
LOG_DEBUG("API server listening on TCP port %d\n", port);
apiPort->init();
}
}
ethServerAPI::ethServerAPI(EthernetClient &_client) : StreamAPI(&client), concurrency::OSThread("ethServerAPI"), client(_client)
{
DEBUG_MSG("Incoming ethernet connection\n");
LOG_DEBUG("Incoming ethernet connection\n");
}
ethServerAPI::~ethServerAPI()
@@ -44,7 +44,7 @@ int32_t ethServerAPI::runOnce()
if (client.connected()) {
return StreamAPI::runOncePart();
} else {
DEBUG_MSG("Client dropped connection, suspending API service\n");
LOG_DEBUG("Client dropped connection, suspending API service\n");
enabled = false; // we no longer need to run
return 0;
}
@@ -71,7 +71,7 @@ int32_t ethServerPort::runOnce()
if (client) {
// Close any previous connection (see FIXME in header file)
if (openAPI) {
DEBUG_MSG("Force closing previous TCP connection\n");
LOG_DEBUG("Force closing previous TCP connection\n");
delete openAPI;
}