From db503b23e86d1cb390d12298875eb0eaffdbfa3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 24 Jul 2016 19:41:01 +0200 Subject: Use log_error instead of cerr --- src/main.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 422219a..8542e41 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,11 +28,9 @@ static bool exiting = false; int config_help(const std::string& missing_option) { if (!missing_option.empty()) - std::cerr << "Error: empty value for option " << missing_option << "." << std::endl; - std::cerr << - "Please provide a configuration file filled like this:\n\n" - "hostname=irc.example.com\npassword=S3CR3T" - << std::endl; + log_error("Error: empty value for option ", missing_option, "."); + log_error("Please provide a configuration file filled like this:\n\n" + "hostname=irc.example.com\npassword=S3CR3T"); return 1; } @@ -52,7 +50,7 @@ static void sigusr_handler(int, siginfo_t*, void*) int main(int ac, char** av) { const std::string conf_filename = ac > 1 ? av[1] : xdg_config_path("biboumi.cfg"); - std::cerr << "Using configuration file: " << conf_filename << std::endl; + log_info("Using configuration file: ", conf_filename); if (!Config::read_conf(conf_filename)) return config_help(""); -- cgit v1.2.3