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:
parent
e1c11c47db
commit
86632a91eb
@ -115,9 +115,6 @@ void log_message (int level, const char *fmt, ...)
|
|||||||
|
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
|
||||||
if(!config.syslog && log_file_fd == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
/*
|
/*
|
||||||
* Figure out if we should write the message or not.
|
* Figure out if we should write the message or not.
|
||||||
@ -164,6 +161,9 @@ void log_message (int level, const char *fmt, ...)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!config.syslog && log_file_fd == -1)
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (config.syslog) {
|
if (config.syslog) {
|
||||||
#ifdef HAVE_VSYSLOG_H
|
#ifdef HAVE_VSYSLOG_H
|
||||||
vsyslog (level, fmt, args);
|
vsyslog (level, fmt, args);
|
||||||
|
Loading…
Reference in New Issue
Block a user