diff --git a/uwsgi.c b/uwsgi.c index a4f7469d..b2f2d128 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -160,6 +160,7 @@ static struct option long_base_options[] = { {"async", required_argument, 0, LONG_ARGS_ASYNC}, #endif {"logto", required_argument, 0, LONG_ARGS_LOGTO}, + {"logto2", required_argument, 0, LONG_ARGS_LOGTO2}, {"logfile-chown", no_argument, &uwsgi.logfile_chown, 1}, {"log-syslog", optional_argument, 0, LONG_ARGS_LOG_SYSLOG}, {"log-socket", required_argument, 0, LONG_ARGS_LOG_SOCKET}, @@ -1351,6 +1352,10 @@ int uwsgi_start(void *v_argv) { uwsgi_as_root(); } + if (uwsgi.logto2) { + logto(uwsgi.logto2); + } + if (uwsgi.chdir) { if (chdir(uwsgi.chdir)) { uwsgi_error("chdir()"); @@ -2554,6 +2559,9 @@ static int manage_base_opt(int i, char *optarg) { case LONG_ARGS_LOGTO: logto(optarg); return 1; + case LONG_ARGS_LOGTO2: + uwsgi.logto2 = optarg; + return 1; case LONG_ARGS_EMPEROR: uwsgi.emperor_dir = optarg; return 1; diff --git a/uwsgi.h b/uwsgi.h index f11d81c0..58405df6 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -447,6 +447,7 @@ struct uwsgi_opt { #define LONG_ARGS_CRON 17123 #define LONG_ARGS_ZERG 17124 #define LONG_ARGS_ZERG_SERVER 17125 +#define LONG_ARGS_LOGTO2 17126 #define UWSGI_OK 0 @@ -852,6 +853,8 @@ struct uwsgi_server { int apps_cnt; int default_app; + char *logto2; + int autoload; int snapshot;