afegit el namespace Logger
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "color.hpp"
|
||||
#include "ui/notifier.hpp" // Para Notifier::Position
|
||||
#include "utils.hpp"
|
||||
#include "ui/logger.hpp" // Para Logger
|
||||
|
||||
// Variable global - ahora se inicializa automáticamente con valores por defecto
|
||||
Param param;
|
||||
@@ -52,7 +53,8 @@ void loadParamsFromFile(const std::string& file_path) {
|
||||
throw std::runtime_error("No se pudo abrir el archivo: " + file_path);
|
||||
}
|
||||
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "\nReading file: %s", getFileName(file_path).c_str());
|
||||
//SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "\nReading file: %s", getFileName(file_path).c_str());
|
||||
Logger::info("Reading file: " + getFileName(file_path));
|
||||
|
||||
std::string line;
|
||||
std::string param_name;
|
||||
@@ -69,7 +71,7 @@ void loadParamsFromFile(const std::string& file_path) {
|
||||
std::istringstream iss(line);
|
||||
if (iss >> param_name >> param_value) {
|
||||
if (!setParams(param_name, param_value)) {
|
||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "Parámetro desconocido: %s", param_name.c_str());
|
||||
Logger::info("WARNING: Parámetro desconocido: " + param_name, Logger::YELLOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user