diff --git a/include/core/nxdt_includes.h b/include/core/nxdt_includes.h index 02f32e3..623e6de 100644 --- a/include/core/nxdt_includes.h +++ b/include/core/nxdt_includes.h @@ -56,7 +56,7 @@ /* Global defines. */ #include "../defines.h" -/* File-based logger. */ +/* File/socket based logger. */ #include "nxdt_log.h" /* Configuration handler. */ diff --git a/libs/borealis b/libs/borealis index 4642d9f..e46cb5a 160000 --- a/libs/borealis +++ b/libs/borealis @@ -1 +1 @@ -Subproject commit 4642d9f87b1fb5509ea771f03d6a194d2accaa2d +Subproject commit e46cb5a5eecf1caca5fee42502bd13ff54b0ae1f diff --git a/libs/libusbhsfs b/libs/libusbhsfs index 0580fc3..db0869f 160000 --- a/libs/libusbhsfs +++ b/libs/libusbhsfs @@ -1 +1 @@ -Subproject commit 0580fc38903546a99cc09e4f16418a3863e067b0 +Subproject commit db0869f220beeeb22894ab2f2c5fa40ddad8c2f2 diff --git a/source/layered_error_frame.cpp b/source/layered_error_frame.cpp index 6eac596..0bc3841 100644 --- a/source/layered_error_frame.cpp +++ b/source/layered_error_frame.cpp @@ -86,7 +86,7 @@ namespace nxdt::views if (index >= static_cast(focus_stack_size)) return false; focus_stack->at(index) = view; - brls::Logger::debug("Focus stack updated"); + LOG_MSG_DEBUG("Focus stack updated"); return true; } diff --git a/source/main.cpp b/source/main.cpp index 824b17f..b58970e 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -35,10 +35,6 @@ int main(int argc, char *argv[]) /* Initialize application resources. */ if (!utilsInitializeResources(argc, (const char**)argv)) return EXIT_FAILURE; - /* Set Borealis log level. */ - /* TODO: rework this before release. */ - brls::Logger::setLogLevel(brls::LogLevel::DEBUG); - /* Load Borealis translation files. */ brls::i18n::loadTranslations(); diff --git a/source/options_tab.cpp b/source/options_tab.cpp index 2b7fb74..c08f262 100644 --- a/source/options_tab.cpp +++ b/source/options_tab.cpp @@ -421,7 +421,7 @@ namespace nxdt::views /* Update configuration. */ configSetBoolean("overclock", value); - brls::Logger::debug("Overclock setting changed by user."); + LOG_MSG_DEBUG("Overclock setting changed by user."); }); this->addView(overclock); @@ -440,7 +440,7 @@ namespace nxdt::views /* Update configuration. */ configSetInteger("naming_convention", selected); - brls::Logger::debug("Naming convention setting changed by user."); + LOG_MSG_DEBUG("Naming convention setting changed by user."); }); this->addView(naming_convention); diff --git a/source/tasks.cpp b/source/tasks.cpp index adc8db5..d07d89f 100644 --- a/source/tasks.cpp +++ b/source/tasks.cpp @@ -33,12 +33,12 @@ namespace nxdt::tasks StatusInfoTask::StatusInfoTask(void) : brls::RepeatingTask(NXDT_TASK_INTERVAL) { brls::RepeatingTask::start(); - brls::Logger::debug("Status info task started."); + LOG_MSG_DEBUG("Status info task started."); } StatusInfoTask::~StatusInfoTask(void) { - brls::Logger::debug("Status info task stopped."); + LOG_MSG_DEBUG("Status info task stopped."); } bool StatusInfoTask::IsInternetConnectionAvailable(void) @@ -89,14 +89,14 @@ namespace nxdt::tasks GameCardTask::GameCardTask(void) : brls::RepeatingTask(NXDT_TASK_INTERVAL) { brls::RepeatingTask::start(); - brls::Logger::debug("Gamecard task started."); + LOG_MSG_DEBUG("Gamecard task started."); this->first_notification = (gamecardGetStatus() >= GameCardStatus_Processing); } GameCardTask::~GameCardTask(void) { - brls::Logger::debug("Gamecard task stopped."); + LOG_MSG_DEBUG("Gamecard task stopped."); } void GameCardTask::run(retro_time_t current_time) @@ -106,7 +106,7 @@ namespace nxdt::tasks this->cur_gc_status = static_cast(gamecardGetStatus()); if (this->cur_gc_status != this->prev_gc_status) { - brls::Logger::debug("Gamecard status change triggered: {}.", this->cur_gc_status); + LOG_MSG_DEBUG("Gamecard status change triggered: %u.", this->cur_gc_status); if (!this->first_notification) { @@ -146,7 +146,7 @@ namespace nxdt::tasks /* Start task. */ brls::RepeatingTask::start(); - brls::Logger::debug("Title task started."); + LOG_MSG_DEBUG("Title task started."); } TitleTask::~TitleTask(void) @@ -155,7 +155,7 @@ namespace nxdt::tasks this->system_metadata.clear(); this->user_metadata.clear(); - brls::Logger::debug("Title task stopped."); + LOG_MSG_DEBUG("Title task stopped."); } void TitleTask::run(retro_time_t current_time) @@ -164,7 +164,7 @@ namespace nxdt::tasks if (titleIsGameCardInfoUpdated()) { - brls::Logger::debug("Title info updated."); + LOG_MSG_DEBUG("Title info updated."); //brls::Application::notify("tasks/notifications/user_titles"_i18n); /* Update user metadata vector. */ @@ -200,7 +200,7 @@ namespace nxdt::tasks free(app_metadata); } - brls::Logger::debug("Retrieved {} {} metadata {}.", app_metadata_count, is_system ? "system" : "user", app_metadata_count == 1 ? "entry" : "entries"); + LOG_MSG_DEBUG("Retrieved %u %s metadata %s.", app_metadata_count, is_system ? "system" : "user", app_metadata_count == 1 ? "entry" : "entries"); } /* USB Mass Storage task. */ @@ -208,7 +208,7 @@ namespace nxdt::tasks UmsTask::UmsTask(void) : brls::RepeatingTask(NXDT_TASK_INTERVAL) { brls::RepeatingTask::start(); - brls::Logger::debug("UMS task started."); + LOG_MSG_DEBUG("UMS task started."); } UmsTask::~UmsTask(void) @@ -216,7 +216,7 @@ namespace nxdt::tasks /* Clear UMS device vector. */ this->ums_devices.clear(); - brls::Logger::debug("UMS task stopped."); + LOG_MSG_DEBUG("UMS task stopped."); } void UmsTask::run(retro_time_t current_time) @@ -225,7 +225,7 @@ namespace nxdt::tasks if (umsIsDeviceInfoUpdated()) { - brls::Logger::debug("UMS device info updated."); + LOG_MSG_DEBUG("UMS device info updated."); brls::Application::notify("tasks/notifications/ums_device"_i18n); /* Update UMS device vector. */ @@ -255,7 +255,7 @@ namespace nxdt::tasks free(ums_devices); } - brls::Logger::debug("Retrieved info for {} UMS {}.", ums_device_count, ums_device_count == 1 ? "device" : "devices"); + LOG_MSG_DEBUG("Retrieved info for %u UMS %s.", ums_device_count, ums_device_count == 1 ? "device" : "devices"); } /* USB host device connection task. */ @@ -263,12 +263,12 @@ namespace nxdt::tasks UsbHostTask::UsbHostTask(void) : brls::RepeatingTask(NXDT_TASK_INTERVAL) { brls::RepeatingTask::start(); - brls::Logger::debug("USB host task started."); + LOG_MSG_DEBUG("USB host task started."); } UsbHostTask::~UsbHostTask(void) { - brls::Logger::debug("USB host task stopped."); + LOG_MSG_DEBUG("USB host task stopped."); } void UsbHostTask::run(retro_time_t current_time) @@ -278,7 +278,7 @@ namespace nxdt::tasks this->cur_usb_host_speed = static_cast(usbIsReady()); if (this->cur_usb_host_speed != this->prev_usb_host_speed) { - brls::Logger::debug("USB host speed changed: {}.", this->cur_usb_host_speed); + LOG_MSG_DEBUG("USB host speed changed: %u.", this->cur_usb_host_speed); brls::Application::notify(this->cur_usb_host_speed ? "tasks/notifications/usb_host_connected"_i18n : "tasks/notifications/usb_host_disconnected"_i18n); /* Update previous USB host speed. */ diff --git a/source/titles_tab.cpp b/source/titles_tab.cpp index 71cadc8..30f5d01 100644 --- a/source/titles_tab.cpp +++ b/source/titles_tab.cpp @@ -131,7 +131,7 @@ namespace nxdt::views try { popup = new TitlesTabPopup(app_metadata, is_system); } catch(const std::string& msg) { - brls::Logger::debug(msg); + LOG_MSG_DEBUG(msg.c_str()); if (popup) delete popup; return; }