diff --git a/AutoStart/AutoStart-FreeBSD.cpp b/AutoStart/AutoStart-FreeBSD.cpp index 1e198f7f..9a2aac3b 100644 --- a/AutoStart/AutoStart-FreeBSD.cpp +++ b/AutoStart/AutoStart-FreeBSD.cpp @@ -53,7 +53,7 @@ bool AutoStart::DisableAutoStart() } else { - LOG_ERROR("Could not establish correct autostart file path."); + LOG_ERROR("[AutoStart] Could not establish correct autostart file path."); } return(success); @@ -75,7 +75,7 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info) \*---------------------------------------------*/ if(!autostart_file_stream) { - LOG_ERROR("Could not open %s for writing.", autostart_file.c_str()); + LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str()); success = false; } /*---------------------------------------------*\ @@ -89,13 +89,13 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info) if (!success) { - LOG_ERROR("An error occurred writing the auto start file."); + LOG_ERROR("[AutoStart] An error occurred writing the auto start file."); } } } else { - LOG_ERROR("Could not establish correct autostart file path."); + LOG_ERROR("[AutoStart] Could not establish correct autostart file path."); } return(success); diff --git a/AutoStart/AutoStart-Linux.cpp b/AutoStart/AutoStart-Linux.cpp index 6df655d4..d5d7328d 100644 --- a/AutoStart/AutoStart-Linux.cpp +++ b/AutoStart/AutoStart-Linux.cpp @@ -53,7 +53,7 @@ bool AutoStart::DisableAutoStart() } else { - LOG_ERROR("Could not establish correct autostart file path."); + LOG_ERROR("[AutoStart] Could not establish correct autostart file path."); } return(success); @@ -76,7 +76,7 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info) \*---------------------------------------------*/ if(!autostart_file_stream) { - LOG_ERROR("Could not open %s for writing.", autostart_file.c_str()); + LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str()); success = false; } /*---------------------------------------------*\ @@ -90,13 +90,13 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info) if (!success) { - LOG_ERROR("An error occurred writing the auto start file."); + LOG_ERROR("[AutoStart] An error occurred writing the auto start file."); } } } else { - LOG_ERROR("Could not establish correct autostart file path."); + LOG_ERROR("[AutoStart] Could not establish correct autostart file path."); } return(success); diff --git a/AutoStart/AutoStart-MacOS.cpp b/AutoStart/AutoStart-MacOS.cpp index 20297140..b26f7b27 100644 --- a/AutoStart/AutoStart-MacOS.cpp +++ b/AutoStart/AutoStart-MacOS.cpp @@ -53,7 +53,7 @@ bool AutoStart::DisableAutoStart() } else { - LOG_ERROR("Could not establish correct autostart file path."); + LOG_ERROR("[AutoStart] Could not establish correct autostart file path."); } return(success); @@ -76,7 +76,7 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info) \*---------------------------------------------*/ if(!autostart_file_stream) { - LOG_ERROR("Could not open %s for writing.", autostart_file.c_str()); + LOG_ERROR("[AutoStart] Could not open %s for writing.", autostart_file.c_str()); success = false; } /*---------------------------------------------*\ @@ -90,13 +90,13 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info) if (!success) { - LOG_ERROR("An error occurred writing the auto start file."); + LOG_ERROR("[AutoStart] An error occurred writing the auto start file."); } } } else { - LOG_ERROR("Could not establish correct autostart file path."); + LOG_ERROR("[AutoStart] Could not establish correct autostart file path."); } return(success); diff --git a/AutoStart/AutoStart-Windows.cpp b/AutoStart/AutoStart-Windows.cpp index e7f62358..a73045ae 100644 --- a/AutoStart/AutoStart-Windows.cpp +++ b/AutoStart/AutoStart-Windows.cpp @@ -46,13 +46,13 @@ bool AutoStart::DisableAutoStart() if(!success) { - LOG_ERROR("An error occurred removing the auto start file."); + LOG_ERROR("[AutoStart] An error occurred removing the auto start file."); } } } else { - LOG_ERROR("Could not establish correct autostart file path."); + LOG_ERROR("[AutoStart] Could not establish correct autostart file path."); } return(success); @@ -124,7 +124,7 @@ bool AutoStart::EnableAutoStart(AutoStartInfo autostart_info) } else { - LOG_ERROR("Could not establish correct autostart file path."); + LOG_ERROR("[AutoStart] Could not establish correct autostart file path."); } return success; diff --git a/LogManager.cpp b/LogManager.cpp index c77627b1..e854f298 100644 --- a/LogManager.cpp +++ b/LogManager.cpp @@ -315,7 +315,7 @@ void LogManager::setLoglevel(unsigned int level) level = LL_TRACE; } - LOG_DEBUG("Loglevel set to %d", level); + LOG_DEBUG("[LogManager] Loglevel set to %d", level); /*-------------------------------------------------*\ | Set the new log level | @@ -335,7 +335,7 @@ void LogManager::setVerbosity(unsigned int level) level = LL_TRACE; } - LOG_DEBUG("Verbosity set to %d", level); + LOG_DEBUG("[LogManager] Verbosity set to %d", level); /*-------------------------------------------------*\ | Set the new verbosity | @@ -345,13 +345,13 @@ void LogManager::setVerbosity(unsigned int level) void LogManager::setPrintSource(bool v) { - LOG_DEBUG("Source code location printouts were %s", v ? "enabled" : "disabled"); + LOG_DEBUG("[LogManager] Source code location printouts were %s", v ? "enabled" : "disabled"); print_source = v; } void LogManager::RegisterDialogShowCallback(LogDialogShowCallback callback, void* receiver) { - LOG_DEBUG("dialog show callback registered"); + LOG_DEBUG("[LogManager] dialog show callback registered"); dialog_show_callbacks.push_back(callback); dialog_show_callback_args.push_back(receiver); } diff --git a/NetworkServer.cpp b/NetworkServer.cpp index 6657519b..fdd1cf8c 100644 --- a/NetworkServer.cpp +++ b/NetworkServer.cpp @@ -49,7 +49,7 @@ NetworkClientInfo::~NetworkClientInfo() { if(client_sock != INVALID_SOCKET) { - LOG_INFO("NetworkServer: Closing server connection: %s", client_ip.c_str()); + LOG_INFO("[NetworkServer] Closing server connection: %s", client_ip.c_str()); delete client_listen_thread; shutdown(client_sock, SD_RECEIVE); closesocket(client_sock); @@ -269,7 +269,7 @@ void NetworkServer::StartServer() if(err) { - LOG_ERROR("NetworkServer: Unable to get address."); + LOG_ERROR("[NetworkServer] Unable to get address."); WSACleanup(); return; } @@ -283,7 +283,7 @@ void NetworkServer::StartServer() if(server_sock[socket_count] == INVALID_SOCKET) { - LOG_ERROR("NetworkServer: Network socket could not be created."); + LOG_ERROR("[NetworkServer] Network socket could not be created."); WSACleanup(); return; } @@ -295,23 +295,23 @@ void NetworkServer::StartServer() { if(errno == EADDRINUSE) { - LOG_ERROR("NetworkServer: Could not bind network socket. Is port %hu already being used?", GetPort()); + LOG_ERROR("[NetworkServer] Could not bind network socket. Is port %hu already being used?", GetPort()); } else if(errno == EACCES) { - LOG_ERROR("NetworkServer: Could not bind network socket. Access to socket was denied."); + LOG_ERROR("[NetworkServer] Could not bind network socket. Access to socket was denied."); } else if(errno == EBADF) { - LOG_ERROR("NetworkServer: Could not bind network socket. sockfd is not a valid file descriptor."); + LOG_ERROR("[NetworkServer] Could not bind network socket. sockfd is not a valid file descriptor."); } else if(errno == EINVAL) { - LOG_ERROR("NetworkServer: Could not bind network socket. The socket is already bound to an address, or addrlen is wrong, or addr is not a valid address for this socket's domain."); + LOG_ERROR("[NetworkServer] Could not bind network socket. The socket is already bound to an address, or addrlen is wrong, or addr is not a valid address for this socket's domain."); } else if(errno == ENOTSOCK) { - LOG_ERROR("NetworkServer: Could not bind network socket. The file descriptor sockfd does not refer to a socket."); + LOG_ERROR("[NetworkServer] Could not bind network socket. The file descriptor sockfd does not refer to a socket."); } else { @@ -319,7 +319,7 @@ void NetworkServer::StartServer() | errno could be a Linux specific error, see: | | https://man7.org/linux/man-pages/man2/bind.2.html | \*---------------------------------------------------------*/ - LOG_ERROR("NetworkManager: Could not bind network socket. Error code: %d.", errno); + LOG_ERROR("[NetworkServer] Could not bind network socket. Error code: %d.", errno); } WSACleanup(); @@ -391,7 +391,7 @@ void NetworkServer::ConnectionThreadFunction(int socket_idx) /*---------------------------------------------------------*\ | This thread handles client connections | \*---------------------------------------------------------*/ - LOG_INFO("NetworkServer: Network connection thread started on port %hu", GetPort()); + LOG_INFO("[NetworkServer] Network connection thread started on port %hu", GetPort()); while(server_online == true) { @@ -407,7 +407,7 @@ void NetworkServer::ConnectionThreadFunction(int socket_idx) \*---------------------------------------------------------*/ if(listen(server_sock[socket_idx], 10) < 0) { - LOG_INFO("NetworkServer: Connection thread closed"); + LOG_INFO("[NetworkServer] Connection thread closed"); server_online = false; return; @@ -423,7 +423,7 @@ void NetworkServer::ConnectionThreadFunction(int socket_idx) if(client_info->client_sock < 0) { - LOG_INFO("NetworkServer: Connection thread closed"); + LOG_INFO("[NetworkServer] Connection thread closed"); server_online = false; server_listening = false; @@ -482,7 +482,7 @@ void NetworkServer::ConnectionThreadFunction(int socket_idx) ClientInfoChanged(); } - LOG_INFO("NetworkServer: Connection thread closed"); + LOG_INFO("[NetworkServer] Connection thread closed"); server_online = false; server_listening = false; ServerListeningChanged(); @@ -552,7 +552,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info) { SOCKET client_sock = client_info->client_sock; - LOG_INFO("NetworkServer: Network server started"); + LOG_INFO("[NetworkServer] Network server started"); /*---------------------------------------------------------*\ | This thread handles messages received from clients | @@ -572,7 +572,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info) if(bytes_read <= 0) { - LOG_ERROR("NetworkServer: recv_select failed receiving magic, closing listener"); + LOG_ERROR("[NetworkServer] recv_select failed receiving magic, closing listener"); goto listen_done; } @@ -581,7 +581,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info) \*---------------------------------------------------------*/ if(header.pkt_magic[i] != openrgb_sdk_magic[i]) { - LOG_ERROR("NetworkServer: Invalid magic received"); + LOG_ERROR("[NetworkServer] Invalid magic received"); continue; } } @@ -601,7 +601,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info) if(tmp_bytes_read <= 0) { - LOG_ERROR("NetworkServer: recv_select failed receiving header, closing listener"); + LOG_ERROR("[NetworkServer] recv_select failed receiving header, closing listener"); goto listen_done; } @@ -623,7 +623,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info) if(tmp_bytes_read <= 0) { - LOG_ERROR("NetworkServer: recv_select failed receiving data, closing listener"); + LOG_ERROR("[NetworkServer] recv_select failed receiving data, closing listener"); goto listen_done; } bytes_read += tmp_bytes_read; @@ -715,7 +715,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info) } else { - LOG_ERROR("NetworkServer: UpdateLEDs packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data)); + LOG_ERROR("[NetworkServer] UpdateLEDs packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data)); goto listen_done; } break; @@ -752,7 +752,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info) } else { - LOG_ERROR("NetworkServer: UpdateZoneLEDs packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data)); + LOG_ERROR("[NetworkServer] UpdateZoneLEDs packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data)); goto listen_done; } break; @@ -781,7 +781,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info) } else { - LOG_ERROR("NetworkServer: UpdateSingleLED packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, (sizeof(int) + sizeof(RGBColor))); + LOG_ERROR("[NetworkServer] UpdateSingleLED packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, (sizeof(int) + sizeof(RGBColor))); goto listen_done; } break; @@ -821,7 +821,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info) } else { - LOG_ERROR("NetworkServer: UpdateMode packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data)); + LOG_ERROR("[NetworkServer] UpdateMode packet has invalid size. Packet size: %d, Data size: %d", header.pkt_size, *((unsigned int*)data)); goto listen_done; } break; diff --git a/PluginManager.cpp b/PluginManager.cpp index dd4881f3..db3d0fa6 100644 --- a/PluginManager.cpp +++ b/PluginManager.cpp @@ -209,7 +209,7 @@ void PluginManager::AddPlugin(const filesystem::path& path, bool is_system) ResourceManager::get()->GetSettingsManager()->SaveSettings(); } - LOG_VERBOSE("Loaded plugin %s", info.Name.c_str()); + LOG_VERBOSE("[PluginManager] Loaded plugin %s", info.Name.c_str()); /*-----------------------------------------------------*\ | Add the plugin to the PluginManager active plugins | diff --git a/ProfileManager.cpp b/ProfileManager.cpp index 03726f22..6101277f 100644 --- a/ProfileManager.cpp +++ b/ProfileManager.cpp @@ -403,7 +403,7 @@ bool ProfileManager::LoadProfileWithOptions { bool temp_ret_val = LoadDeviceFromListWithOptions(temp_controllers, temp_controller_used, controllers[controller_index], load_size, load_settings); std::string current_name = controllers[controller_index]->name + " @ " + controllers[controller_index]->location; - LOG_INFO("Profile loading: %s for %s", ( temp_ret_val ? "Succeeded" : "FAILED!" ), current_name.c_str()); + LOG_INFO("[ProfileManager] Profile loading: %s for %s", ( temp_ret_val ? "Succeeded" : "FAILED!" ), current_name.c_str()); ret_val |= temp_ret_val; } @@ -443,7 +443,7 @@ void ProfileManager::UpdateProfileList() if(filename.find(".orp") != std::string::npos) { - LOG_INFO("Found file: %s attempting to validate header", filename.c_str()); + LOG_INFO("[ProfileManager] Found file: %s attempting to validate header", filename.c_str()); /*---------------------------------------------------------*\ | Open input file in binary mode | @@ -471,16 +471,16 @@ void ProfileManager::UpdateProfileList() filename.erase(filename.length() - 4); profile_list.push_back(filename); - LOG_INFO("Valid v%i profile found for %s", profile_version, filename.c_str()); + LOG_INFO("[ProfileManager] Valid v%i profile found for %s", profile_version, filename.c_str()); } else { - LOG_WARNING("Profile %s isn't valid for current version (v%i, expected v%i at most)", filename.c_str(), profile_version, OPENRGB_PROFILE_VERSION); + LOG_WARNING("[ProfileManager] Profile %s isn't valid for current version (v%i, expected v%i at most)", filename.c_str(), profile_version, OPENRGB_PROFILE_VERSION); } } else { - LOG_WARNING("Profile %s isn't valid: header is missing", filename.c_str()); + LOG_WARNING("[ProfileManager] Profile %s isn't valid: header is missing", filename.c_str()); } profile_file.close(); diff --git a/ResourceManager.cpp b/ResourceManager.cpp index 3716f788..4d2bb062 100644 --- a/ResourceManager.cpp +++ b/ResourceManager.cpp @@ -208,7 +208,7 @@ ResourceManager::~ResourceManager() void ResourceManager::RegisterI2CBus(i2c_smbus_interface *bus) { - LOG_INFO("Registering I2C interface: %s Device %04X:%04X Subsystem: %04X:%04X", bus->device_name, bus->pci_vendor, bus->pci_device,bus->pci_subsystem_vendor,bus->pci_subsystem_device); + LOG_INFO("[ResourceManager] Registering I2C interface: %s Device %04X:%04X Subsystem: %04X:%04X", bus->device_name, bus->pci_vendor, bus->pci_device,bus->pci_subsystem_vendor,bus->pci_subsystem_device); busses.push_back(bus); } @@ -729,9 +729,9 @@ bool ResourceManager::AttemptLocalConnection() if(!client->GetConnected()) { - LOG_TRACE("[main] Client failed to connect"); + LOG_TRACE("[ResourceManager] Client failed to connect"); client->StopClient(); - LOG_TRACE("[main] Client stopped"); + LOG_TRACE("[ResourceManager] Client stopped"); delete client; @@ -740,7 +740,7 @@ bool ResourceManager::AttemptLocalConnection() else { ResourceManager::get()->RegisterNetworkClient(client); - LOG_TRACE("[main] Registered network client"); + LOG_TRACE("[ResourceManager] Registered network client"); success = true; @@ -913,7 +913,7 @@ bool ResourceManager::ProcessPreDetection() \*-------------------------------------------------*/ int hid_status = hid_init(); - LOG_INFO("Initializing HID interfaces: %s", ((hid_status == 0) ? "Success" : "Failed")); + LOG_INFO("[ResourceManager] Initializing HID interfaces: %s", ((hid_status == 0) ? "Success" : "Failed")); /*-------------------------------------------------*\ | Mark the detection as ongoing | @@ -1147,8 +1147,8 @@ void ResourceManager::DetectDevicesCoroutine() { SPDWrapper accessor(spd); dimm_type = spd.memory_type(); - LOG_INFO("Detected occupied slot %d, bus %d, type %s", spd_addr - 0x50 + 1, bus, spd_memory_type_name[dimm_type]); - LOG_DEBUG("Jedec ID: 0x%04x", accessor.jedec_id()); + LOG_INFO("[ResourceManager] Detected occupied slot %d, bus %d, type %s", spd_addr - 0x50 + 1, bus, spd_memory_type_name[dimm_type]); + LOG_DEBUG("[ResourceManager] Jedec ID: 0x%04x", accessor.jedec_id()); slots.push_back(accessor); } } @@ -1260,7 +1260,7 @@ void ResourceManager::DetectDevicesCoroutine() HIDDeviceDetectorBlock & detector = hid_device_detectors[hid_detector_idx]; hid_devices = hid_enumerate(detector.vid, detector.pid); - LOG_VERBOSE("Trying to run detector for [%s] (for %04x:%04x)", detector.name.c_str(), detector.vid, detector.pid); + LOG_VERBOSE("[ResourceManager] Trying to run detector for [%s] (for %04x:%04x)", detector.name.c_str(), detector.vid, detector.pid); current_hid_device = hid_devices; @@ -1631,7 +1631,7 @@ void ResourceManager::DetectDevicesCoroutine() void ResourceManager::StopDeviceDetection() { - LOG_INFO("Detection abort requested"); + LOG_INFO("[ResourceManager] Detection abort requested"); detection_is_required = false; detection_percent = 100; detection_string = "Stopping"; @@ -1721,7 +1721,7 @@ void ResourceManager::HidExitCoroutine() \*-------------------------------------------------*/ int hid_status = hid_exit(); - LOG_DEBUG("Closing HID interfaces: %s", ((hid_status == 0) ? "Success" : "Failed")); + LOG_DEBUG("[ResourceManager] Closing HID interfaces: %s", ((hid_status == 0) ? "Success" : "Failed")); } void ResourceManager::RunInBackgroundThread(std::function coroutine) @@ -1736,7 +1736,7 @@ void ResourceManager::RunInBackgroundThread(std::function coroutine) BackgroundThreadStateMutex.lock(); if(ScheduledBackgroundFunction != nullptr) { - LOG_WARNING("Detection coroutine: assigned a new coroutine when one was already scheduled - probably two rescan events sent at once"); + LOG_WARNING("[ResourceManager] Detection coroutine: assigned a new coroutine when one was already scheduled - probably two rescan events sent at once"); } ScheduledBackgroundFunction = coroutine; BackgroundThreadStateMutex.unlock(); @@ -1768,11 +1768,11 @@ void ResourceManager::BackgroundThreadFunction() } catch(std::exception& e) { - LOG_ERROR("Unhandled exception in coroutine; e.what(): %s", e.what()); + LOG_ERROR("[ResourceManager] Unhandled exception in coroutine; e.what(): %s", e.what()); } catch(...) { - LOG_ERROR("Unhandled exception in coroutine"); + LOG_ERROR("[ResourceManager] Unhandled exception in coroutine"); } } // This line will cause the thread to suspend until the condition variable is triggered @@ -1889,7 +1889,7 @@ void ResourceManager::UpdateDetectorSettings() \*-------------------------------------------------*/ if(save_settings) { - LOG_INFO("Saving detector settings"); + LOG_INFO("[ResourceManager] Saving detector settings"); settings_manager->SetSettings("Detectors", detector_settings); diff --git a/SPDAccessor/DDR5DirectAccessor.cpp b/SPDAccessor/DDR5DirectAccessor.cpp index 341e2df7..43459102 100644 --- a/SPDAccessor/DDR5DirectAccessor.cpp +++ b/SPDAccessor/DDR5DirectAccessor.cpp @@ -38,7 +38,7 @@ bool DDR5DirectAccessor::isAvailable(i2c_smbus_interface *bus, uint8_t spd_addr) break; } - LOG_TRACE("SPD Hub Magic: 0x%02x 0x%02x", ddr5Magic, ddr5Sensor); + LOG_TRACE("[DDR5DirectAccessor] SPD Hub Magic: 0x%02x 0x%02x", ddr5Magic, ddr5Sensor); if(ddr5Magic == 0x51 && (ddr5Sensor & 0xEF) == 0x08) { @@ -48,7 +48,7 @@ bool DDR5DirectAccessor::isAvailable(i2c_smbus_interface *bus, uint8_t spd_addr) int page = bus->i2c_smbus_read_byte_data(spd_addr, SPD_DDR5_MREG_VIRTUAL_PAGE); std::this_thread::sleep_for(SPD_IO_DELAY); - LOG_TRACE("SPD Page: 0x%02x", page); + LOG_TRACE("[DDR5DirectAccessor] SPD Page: 0x%02x", page); if(page < 0) { break; diff --git a/SPDAccessor/SPDDetector.cpp b/SPDAccessor/SPDDetector.cpp index 9d1b72b2..420930b3 100644 --- a/SPDAccessor/SPDDetector.cpp +++ b/SPDAccessor/SPDDetector.cpp @@ -37,7 +37,7 @@ void SPDDetector::detect_memory_type() { SPDAccessor *accessor; - LOG_DEBUG("Probing DRAM on address 0x%02x", address); + LOG_DEBUG("[SPDDetector] Probing DRAM on address 0x%02x", address); /*---------------------------------------------------------*\ | On Linux, attempt to use the ee1004 or spd5118 drivers to | @@ -80,7 +80,7 @@ void SPDDetector::detect_memory_type() \*---------------------------------------------------------*/ else if(mem_type == SPD_RESERVED) { - LOG_TRACE("Probing memory type older than DDR4"); + LOG_TRACE("[SPDDetector] Probing memory type older than DDR4"); int value = bus->i2c_smbus_read_byte_data(address, 0x02); diff --git a/cli.cpp b/cli.cpp index 2eee8efa..bc3875f0 100644 --- a/cli.cpp +++ b/cli.cpp @@ -864,12 +864,12 @@ bool OptionProfile(std::string argument, std::vector& rgb_contr RGBController* device = rgb_controllers[controller_idx]; device->DeviceUpdateMode(); - LOG_DEBUG("Updating mode for %s to %i", device->name.c_str(), device->active_mode); + LOG_DEBUG("[CLI] Updating mode for %s to %i", device->name.c_str(), device->active_mode); if(device->modes[device->active_mode].color_mode == MODE_COLORS_PER_LED) { device->DeviceUpdateLEDs(); - LOG_DEBUG("Mode uses per-LED color, also updating LEDs"); + LOG_DEBUG("[CLI] Mode uses per-LED color, also updating LEDs"); } } @@ -1282,7 +1282,7 @@ unsigned int cli_pre_detection(int argc, char* argv[]) std::string option = argv[arg_index]; std::string argument = ""; - LOG_DEBUG("Parsing CLI option: %s", option.c_str()); + LOG_DEBUG("[CLI] Parsing CLI option: %s", option.c_str()); /*---------------------------------------------------------*\ | Handle options that take an argument | @@ -1317,11 +1317,11 @@ unsigned int cli_pre_detection(int argc, char* argv[]) if(filesystem::is_directory(config_path)) { ResourceManager::get()->SetConfigurationDirectory(config_path); - LOG_INFO("Setting config directory to %s",argument.c_str()); // TODO: Use config_path in logs somehow + LOG_INFO("[CLI] Setting config directory to %s",argument.c_str()); // TODO: Use config_path in logs somehow } else { - LOG_ERROR("'%s' is not a valid directory",argument.c_str()); // TODO: Use config_path in logs somehow + LOG_ERROR("[CLI] '%s' is not a valid directory",argument.c_str()); // TODO: Use config_path in logs somehow print_help = true; break; } @@ -1474,7 +1474,7 @@ unsigned int cli_pre_detection(int argc, char* argv[]) } else { - LOG_ERROR("Loglevel out of range: %d (0-6)", level); + LOG_ERROR("[CLI] Loglevel out of range: %d (0-6)", level); print_help = true; break; } @@ -1511,7 +1511,7 @@ unsigned int cli_pre_detection(int argc, char* argv[]) } else { - LOG_ERROR("Invalid loglevel"); + LOG_ERROR("[CLI] Invalid loglevel"); print_help = true; break; } @@ -1519,7 +1519,7 @@ unsigned int cli_pre_detection(int argc, char* argv[]) } else { - LOG_ERROR("Missing argument for --loglevel"); + LOG_ERROR("[CLI] Missing argument for --loglevel"); print_help = true; break; } @@ -1768,11 +1768,11 @@ unsigned int cli_post_detection() { if(ResourceManager::get()->GetProfileManager()->SaveProfile(profile_save_filename)) { - LOG_INFO("Profile saved successfully"); + LOG_INFO("[CLI] Profile saved successfully"); } else { - LOG_ERROR("Profile saving failed"); + LOG_ERROR("[CLI] Profile saving failed"); } } diff --git a/qt/OpenRGBZonesBulkResizer/OpenRGBZonesBulkResizer.cpp b/qt/OpenRGBZonesBulkResizer/OpenRGBZonesBulkResizer.cpp index b48e95f6..d9d9ed6c 100644 --- a/qt/OpenRGBZonesBulkResizer/OpenRGBZonesBulkResizer.cpp +++ b/qt/OpenRGBZonesBulkResizer/OpenRGBZonesBulkResizer.cpp @@ -36,13 +36,13 @@ void OpenRGBZonesBulkResizer::RunChecks(QWidget *parent) if(!should_run) { - LOG_DEBUG("Skipping zones sizes checks."); + LOG_DEBUG("[ZonesBulkResizer] Skipping zones sizes checks."); return; } } } - LOG_DEBUG("Running zones sizes checks..."); + LOG_DEBUG("[ZonesBulkResizer] Running zones sizes checks..."); /*---------------------------------------------------------*\ | Collect the unconfigured zones | @@ -64,7 +64,7 @@ void OpenRGBZonesBulkResizer::RunChecks(QWidget *parent) } } - LOG_DEBUG("Zones checks finished: %d unconfigured zone(s).", zones.size()); + LOG_DEBUG("[ZonesBulkResizer] Zones checks finished: %d unconfigured zone(s).", zones.size()); /*---------------------------------------------------------*\ | Show the configuration tool GUI if we have some |