From 646ca655501dace981001843289d896657ee6b82 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 17 May 2024 23:23:37 +0500 Subject: upd: replaced cout with log + removed unused #include --- src/config.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/config.cpp') diff --git a/src/config.cpp b/src/config.cpp index a8bf3fb..ec55913 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -2,19 +2,19 @@ #include #include -#include #include #include #include +#include "logger.hpp" + namespace bot { std::optional parse_configuration_from_file( const std::string &file_path) { std::ifstream ifs(file_path); if (!ifs.is_open()) { - std::cerr << "*** Failed to open the configuration file: " << file_path - << "!\n"; + log::error("Configuration", "Failed to open the file at " + file_path); return std::nullopt; } @@ -77,6 +77,8 @@ namespace bot { cfg.twitch_credentials = ttv_crd_cfg; cfg.database = db_cfg; + log::info("Configuration", + "Successfully loaded the file from '" + file_path + "'"); return cfg; } } -- cgit v1.2.3