mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 21:51:30 +00:00
fix early error reporting
This commit is contained in:
+7
-1
@@ -343,7 +343,7 @@ static struct uwsgi_option uwsgi_base_options[] = {
|
||||
#ifdef UWSGI_ZEROMQ
|
||||
{"log-zeromq", required_argument, 0, "send logs to a zeromq server", uwsgi_opt_set_logger, "zeromq", UWSGI_OPT_MASTER | UWSGI_OPT_LOG_MASTER},
|
||||
#endif
|
||||
{"log-master", no_argument, 0, "delegate logging to master process", uwsgi_opt_true, &uwsgi.log_master, 0},
|
||||
{"log-master", no_argument, 0, "delegate logging to master process", uwsgi_opt_true, &uwsgi.log_master, UWSGI_OPT_MASTER},
|
||||
{"log-master-bufsize", required_argument, 0, "set the buffer size for the master logger. bigger log messages will be truncated", uwsgi_opt_set_64bit, &uwsgi.log_master_bufsize, 0},
|
||||
{"log-reopen", no_argument, 0, "reopen log after reload", uwsgi_opt_true, &uwsgi.log_reopen, 0},
|
||||
{"log-truncate", no_argument, 0, "truncate log on startup", uwsgi_opt_true, &uwsgi.log_truncate, 0},
|
||||
@@ -1391,12 +1391,18 @@ void uwsgi_flush_logs() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (uwsgi.mywid == 0)
|
||||
goto check;
|
||||
|
||||
return;
|
||||
|
||||
check:
|
||||
// this buffer could not be initialized !!!
|
||||
if (uwsgi.log_master) {
|
||||
uwsgi.log_master_buf = uwsgi_malloc(uwsgi.log_master_bufsize);
|
||||
}
|
||||
|
||||
// check for data in logpipe
|
||||
pfd.events = POLLIN;
|
||||
pfd.fd = uwsgi.shared->worker_log_pipe[0];
|
||||
|
||||
Reference in New Issue
Block a user