diff options
author | louiz’ <louiz@louiz.org> | 2016-12-10 03:58:27 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-12-10 03:59:00 +0100 |
commit | 4cc3dc03fc8419abde6e77dceda773a19a246c43 (patch) | |
tree | 54ac2b2febac6a749eaa800aeb289d13fb2f8e6d | |
parent | e63f79169b2c031bdc1a4bb6ba8df34363e9e3c0 (diff) | |
download | biboumi-4cc3dc03fc8419abde6e77dceda773a19a246c43.tar.gz biboumi-4cc3dc03fc8419abde6e77dceda773a19a246c43.tar.bz2 biboumi-4cc3dc03fc8419abde6e77dceda773a19a246c43.tar.xz biboumi-4cc3dc03fc8419abde6e77dceda773a19a246c43.zip |
The config module doesn’t use the logger at all
-rw-r--r-- | louloulibs/CMakeLists.txt | 1 | ||||
-rw-r--r-- | louloulibs/config/config.cpp | 7 | ||||
-rw-r--r-- | louloulibs/config/config.hpp | 1 | ||||
-rw-r--r-- | tests/config.cpp | 2 |
4 files changed, 4 insertions, 7 deletions
diff --git a/louloulibs/CMakeLists.txt b/louloulibs/CMakeLists.txt index c5ed7a7..2251eed 100644 --- a/louloulibs/CMakeLists.txt +++ b/louloulibs/CMakeLists.txt @@ -99,7 +99,6 @@ target_link_libraries(utils ${ICONV_LIBRARIES}) file(GLOB source_config config/*.[hc]pp) add_library(config STATIC ${source_config}) -target_link_libraries(config utils) # ## logger diff --git a/louloulibs/config/config.cpp b/louloulibs/config/config.cpp index 417981d..24a1c87 100644 --- a/louloulibs/config/config.cpp +++ b/louloulibs/config/config.cpp @@ -1,8 +1,7 @@ #include <config/config.hpp> -#include <logger/logger.hpp> +#include <iostream> #include <cstring> -#include <sstream> #include <cstdlib> @@ -66,7 +65,7 @@ bool Config::read_conf(const std::string& name) std::ifstream file(Config::filename.data()); if (!file.is_open()) { - log_error("Error while opening file ", filename, " for reading: ", strerror(errno)); + std::cerr << "Error while opening file " << filename << " for reading: " << strerror(errno) << std::endl; return false; } @@ -96,7 +95,7 @@ void Config::save_to_file() std::ofstream file(Config::filename.data()); if (file.fail()) { - log_error("Could not save config file."); + std::cerr << "Could not save config file." << std::endl; return ; } for (const auto& it: Config::values) diff --git a/louloulibs/config/config.hpp b/louloulibs/config/config.hpp index 6728df8..4e01281 100644 --- a/louloulibs/config/config.hpp +++ b/louloulibs/config/config.hpp @@ -15,7 +15,6 @@ #pragma once - #include <functional> #include <fstream> #include <memory> diff --git a/tests/config.cpp b/tests/config.cpp index a6fa92a..ec9844f 100644 --- a/tests/config.cpp +++ b/tests/config.cpp @@ -8,7 +8,7 @@ TEST_CASE("Config basic") { // Disable all output for this test - IoTester<std::ostream> out(std::cout); + IoTester<std::ostream> out(std::cerr); // Write a value in the config file Config::read_conf("test.cfg"); Config::set("coucou", "bonjour", true); |