summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-07-24 19:41:01 +0200
committerlouiz’ <louiz@louiz.org>2016-07-24 20:03:34 +0200
commitdb503b23e86d1cb390d12298875eb0eaffdbfa3c (patch)
tree046775d13d3738bf6478306d152cb0517c4d30eb /src
parent7cc05ab4967e9fb77b6e4d8ca9800c8625895ad3 (diff)
downloadbiboumi-db503b23e86d1cb390d12298875eb0eaffdbfa3c.tar.gz
biboumi-db503b23e86d1cb390d12298875eb0eaffdbfa3c.tar.bz2
biboumi-db503b23e86d1cb390d12298875eb0eaffdbfa3c.tar.xz
biboumi-db503b23e86d1cb390d12298875eb0eaffdbfa3c.zip
Use log_error instead of cerr
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp10
1 files changed, 4 insertions, 6 deletions
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("");