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

@@ -12,7 +12,7 @@
#include <string>
#include <utility>
#include "spdlog/spdlog.h"
#include "services/logging/logger.h"
namespace {
constexpr time_t kConnectionTimeoutSeconds = 5;
@@ -54,7 +54,11 @@ std::string HttpWebClient::Get(const std::string& url) {
}
if (result->status < kSuccessMin || result->status >= kSuccessMax) {
spdlog::error("[HttpWebClient] Request failed for URL: " + url);
if (logger_) {
logger_->Log(LogLevel::Error, PipelinePhase::UserGeneration,
std::string("[HttpWebClient] Request failed for URL: ") +
url);
}
throw std::runtime_error(
"[HttpWebClient] HTTP " + std::to_string(result->status) +
" for URL: " + url);