diff options
author | Eric Leblond <eric@inl.fr> | 2009-01-13 00:13:25 +0100 |
---|---|---|
committer | Eric Leblond <eric@inl.fr> | 2009-01-13 08:20:52 +0100 |
commit | 4253141a9ea4745c3da5b28e00344d5f0fc706a5 (patch) | |
tree | 023a89e157c7a8a0c0f0dd2f202148c7a8668f85 | |
parent | 86d7ed0fecdead328e11ea6939d2ed8375b614a1 (diff) |
Display logfile to check in case of error.
This patch adds the display of the used logging file to look at if there
is a critical error.
-rw-r--r-- | src/ulogd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ulogd.c b/src/ulogd.c index badd7bd..2e86b9d 100644 --- a/src/ulogd.c +++ b/src/ulogd.c @@ -440,8 +440,13 @@ void __ulogd_log(int level, char *file, int line, const char *format, ...) static void warn_and_exit(int daemonize) { - if (!daemonize) - fprintf(stderr, "Fatal error, check logfile.\n"); + if (!daemonize) { + if (logfile) + fprintf(stderr, "Fatal error, check logfile \"%s\".\n", + ulogd_logfile); + else + fprintf(stderr, "Fatal error.\n"); + } exit(1); } |