From d29a8566a9aeba007062abc831d3eedbee0fd2cc Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Fri, 14 Oct 2016 17:10:13 +1000 Subject: [PATCH] * use log_fatal --- src/backend-test.c | 6 +++--- src/daemon.c | 4 ++-- src/source-test.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/backend-test.c b/src/backend-test.c index b95a4cf..d0af5e8 100644 --- a/src/backend-test.c +++ b/src/backend-test.c @@ -25,19 +25,19 @@ int main(int argc, char *argv[]) { memset(&config, 0x0, sizeof(config)); if (f2b_config_load(&config, argv[1], false) != true) { - f2b_log_msg(log_error, "can't load config"); + f2b_log_msg(log_fatal, "can't load config"); return EXIT_FAILURE; } if (config.backends == NULL) { - f2b_log_msg(log_error, "no backends found in config"); + f2b_log_msg(log_fatal, "no backends found in config"); return EXIT_FAILURE; } else { section = config.backends; } if ((backend = f2b_backend_create(section, argv[2])) == NULL) { - f2b_log_msg(log_error, "can't create backend '%s' with id '%s'", section->name, argv[2]); + f2b_log_msg(log_fatal, "can't create backend '%s' with id '%s'", section->name, argv[2]); return EXIT_FAILURE; } diff --git a/src/daemon.c b/src/daemon.c index 65c7570..44f9942 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -322,7 +322,7 @@ int main(int argc, char *argv[]) { const char *err = (errno == EWOULDBLOCK) ? "another instance already running" : strerror(errno); - f2b_log_msg(log_error, "can't lock pidfile: %s", err); + f2b_log_msg(log_fatal, "can't lock pidfile: %s", err); exit(EXIT_FAILURE); } fprintf(pidfile, "%d\n", getpid()); @@ -342,7 +342,7 @@ int main(int argc, char *argv[]) { f2b_config_free(&config); if (!jails) { - f2b_log_msg(log_warn, "no jails configured, exiting"); + f2b_log_msg(log_fatal, "no jails configured, exiting"); return EXIT_FAILURE; } diff --git a/src/source-test.c b/src/source-test.c index 17f3611..e430b96 100644 --- a/src/source-test.c +++ b/src/source-test.c @@ -26,24 +26,24 @@ int main(int argc, char *argv[]) { memset(&config, 0x0, sizeof(config)); if (f2b_config_load(&config, argv[1], false) != true) { - f2b_log_msg(log_error, "can't load config"); + f2b_log_msg(log_fatal, "can't load config"); return EXIT_FAILURE; } if (config.sources == NULL) { - f2b_log_msg(log_error, "no sources found in config"); + f2b_log_msg(log_fatal, "no sources found in config"); return EXIT_FAILURE; } else { section = config.sources; } if ((source = f2b_source_create(section, argv[2], f2b_log_error_cb)) == NULL) { - f2b_log_msg(log_error, "can't create source '%s' with init '%s'", section->name, argv[2]); + f2b_log_msg(log_fatal, "can't create source '%s' with init '%s'", section->name, argv[2]); return EXIT_FAILURE; } if (f2b_source_start(source) == false) { - f2b_log_msg(log_error, "source start error: %s", f2b_source_error(source)); + f2b_log_msg(log_fatal, "source start error: %s", f2b_source_error(source)); exit(EXIT_FAILURE); }