From 49c61d1845d4621183f51767df4cc0693bafefcb Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 19 Mar 2022 22:03:28 +0100 Subject: [PATCH] fixing ftp task --- src/TaskFTP.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/TaskFTP.cpp b/src/TaskFTP.cpp index d9615cf..e4a6037 100644 --- a/src/TaskFTP.cpp +++ b/src/TaskFTP.cpp @@ -14,8 +14,7 @@ FTPTask::~FTPTask() { bool FTPTask::setup(System &system) { for (Configuration::Ftp::User user : system.getUserConfig()->ftp.users) { - logPrintD("Adding user to FTP Server: "); - logPrintlnD(user.name); + system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, getName(), "Adding user to FTP Server: %s", user.name); _ftpServer.addUser(user.name, user.password); } _ftpServer.addFilesystem("SPIFFS", &SPIFFS); @@ -31,8 +30,7 @@ bool FTPTask::loop(System &system) { _ftpServer.handle(); static bool configWasOpen = false; if (configWasOpen && _ftpServer.countConnections() == 0) { - logPrintlnW("Maybe the config has been changed via FTP, lets restart now to get the new config..."); - logPrintlnW(""); + system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_WARN, getName(), "Maybe the config has been changed via FTP, lets restart now to get the new config..."); ESP.restart(); } if (_ftpServer.countConnections() > 0) {