diff --git a/src/log.c b/src/log.c index 69b6dc0..f85d29d 100644 --- a/src/log.c +++ b/src/log.c @@ -115,9 +115,6 @@ void log_message (int level, const char *fmt, ...) ssize_t ret; - if(!config.syslog && log_file_fd == -1) - return; - #ifdef NDEBUG /* * Figure out if we should write the message or not. @@ -164,6 +161,9 @@ void log_message (int level, const char *fmt, ...) goto out; } + if(!config.syslog && log_file_fd == -1) + goto out; + if (config.syslog) { #ifdef HAVE_VSYSLOG_H vsyslog (level, fmt, args);