From be2af9fdf0c13061c10ed2e4fcf92f9f31266336 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 14 May 2022 19:49:12 +0200 Subject: [PATCH] Adjust logs to use a proper log-level --- src/BackgroundThread.cpp | 4 ++-- src/main.cpp | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/BackgroundThread.cpp b/src/BackgroundThread.cpp index 8a1bd63..85acb94 100644 --- a/src/BackgroundThread.cpp +++ b/src/BackgroundThread.cpp @@ -12,7 +12,7 @@ BackgroundThread::BackgroundThread() : BackgroundThreadWrapper(BackgroundThread: this->serverSocket = create_server(PORT); DCFlushRange(&(this->serverSocket), 4); mutex.unlock(); - DEBUG_FUNCTION_LINE("Resume Thread"); + DEBUG_FUNCTION_LINE_VERBOSE("Resume Thread"); CThread::resumeThread(); } @@ -33,7 +33,7 @@ BOOL BackgroundThread::whileLoop() { if (this->serverSocket >= 0) { network_down = process_ftp_events(this->serverSocket); if (network_down) { - DEBUG_FUNCTION_LINE("Network is down %d", this->serverSocket); + DEBUG_FUNCTION_LINE_VERBOSE("Network is down %d", this->serverSocket); cleanup_ftp(); network_close(this->serverSocket); this->serverSocket = -1; diff --git a/src/main.cpp b/src/main.cpp index 23f9c26..b95a87a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,13 +2,11 @@ #include "utils/logger.h" #include "virtualpath.h" #include -#include #include #include #include #include #include -#include #include WUPS_PLUGIN_NAME("FTPiiU"); @@ -41,18 +39,16 @@ ON_APPLICATION_START() { AddVirtualFSVOLPath("external01", nullptr, nullptr); AddVirtualFSVOLPath("content", nullptr, nullptr); - DEBUG_FUNCTION_LINE("IOSUHAX_Open"); int res = IOSUHAX_Open(nullptr); if (res < 0) { - DEBUG_FUNCTION_LINE("IOSUHAX_open failed"); + DEBUG_FUNCTION_LINE_ERR("IOSUHAX_open failed"); } else { iosuhaxMount = 1; //fatInitDefault(); - DEBUG_FUNCTION_LINE("IOSUHAX_FSA_Open"); fsaFd = IOSUHAX_FSA_Open(); if (fsaFd < 0) { - DEBUG_FUNCTION_LINE("IOSUHAX_FSA_Open failed"); + DEBUG_FUNCTION_LINE_ERR("IOSUHAX_FSA_Open failed"); } DEBUG_FUNCTION_LINE("IOSUHAX_FSA_Open done"); @@ -86,10 +82,10 @@ void stopThread() { } ON_APPLICATION_REQUESTS_EXIT() { - DEBUG_FUNCTION_LINE("Ending ftp server"); + DEBUG_FUNCTION_LINE_VERBOSE("Ending ftp server"); stopThread(); - DEBUG_FUNCTION_LINE("Ended ftp Server."); + DEBUG_FUNCTION_LINE_VERBOSE("Ended ftp Server."); if (iosuhaxMount) { IOSUHAX_sdio_disc_interface.shutdown();