summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp8
1 files changed, 5 insertions, 3 deletions
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 <cctype>
#include <fstream>
-#include <iostream>
#include <optional>
#include <sstream>
#include <string>
+#include "logger.hpp"
+
namespace bot {
std::optional<Configuration> 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;
}
}