fix early logging

tinyproxy uses a curious mechanism to log those early messages
that result from parsing the config file before the logging mechanism
has been properly set up yet by finishing parsing of the config file:
those early messages are written into a memory buffer and then
are printed later on. this slipped my attention when making it possible
to log to stdout in ccbbb81a.
This commit is contained in:
rofl0r 2018-02-25 17:59:24 +00:00 committed by rofl0r
parent e1c11c47db
commit 86632a91eb

View File

@ -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);