Integrate logging channel system

update logging to use logger channel

updates
This commit is contained in:
Aaron Po
2026-05-15 01:13:53 -04:00
parent 29972f54d1
commit 54a46458a3
35 changed files with 586 additions and 440 deletions

View File

@@ -6,7 +6,8 @@
#include "json_handling/json_loader.h"
#include <spdlog/spdlog.h>
#include "services/logging/logger.h"
#include <iostream>
#include <boost/json.hpp>
#include <fstream>
@@ -58,7 +59,7 @@ static std::vector<std::string> ReadRequiredStringArray(
}
std::vector<Location> JsonLoader::LoadLocations(
const std::filesystem::path& filepath) {
const std::filesystem::path& filepath, std::shared_ptr<ILogger> logger) {
std::ifstream input(filepath);
if (!input.is_open()) {
throw std::runtime_error("Failed to open locations file: " +
@@ -104,7 +105,5 @@ std::vector<Location> JsonLoader::LoadLocations(
});
}
spdlog::info("[JsonLoader] Loaded {} locations from {}", locations.size(),
filepath.string());
return locations;
}