mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-14 16:33:52 +00:00
refactor: replace raw console output with LOG_* macros in warden_emulator, transport_manager, keybinding_manager
This commit is contained in:
parent
bf5219c822
commit
4049f73ca6
3 changed files with 99 additions and 54 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#include "ui/keybinding_manager.hpp"
|
||||
#include "core/logger.hpp"
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
||||
namespace wowee::ui {
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ const char* KeybindingManager::getActionName(Action action) {
|
|||
void KeybindingManager::loadFromConfigFile(const std::string& filePath) {
|
||||
std::ifstream file(filePath);
|
||||
if (!file.is_open()) {
|
||||
std::cerr << "[KeybindingManager] Failed to open config file: " << filePath << std::endl;
|
||||
LOG_ERROR("KeybindingManager: Failed to open config file: ", filePath);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ void KeybindingManager::loadFromConfigFile(const std::string& filePath) {
|
|||
}
|
||||
|
||||
file.close();
|
||||
std::cout << "[KeybindingManager] Loaded keybindings from " << filePath << std::endl;
|
||||
LOG_INFO("KeybindingManager: Loaded keybindings from ", filePath);
|
||||
}
|
||||
|
||||
void KeybindingManager::saveToConfigFile(const std::string& filePath) const {
|
||||
|
|
@ -301,9 +301,9 @@ void KeybindingManager::saveToConfigFile(const std::string& filePath) const {
|
|||
if (outFile.is_open()) {
|
||||
outFile << content;
|
||||
outFile.close();
|
||||
std::cout << "[KeybindingManager] Saved keybindings to " << filePath << std::endl;
|
||||
LOG_INFO("KeybindingManager: Saved keybindings to ", filePath);
|
||||
} else {
|
||||
std::cerr << "[KeybindingManager] Failed to write config file: " << filePath << std::endl;
|
||||
LOG_ERROR("KeybindingManager: Failed to write config file: ", filePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue