@europython add --logto2 option

This commit is contained in:
roberto@goyle
2011-06-21 14:53:50 +02:00
parent 296549d1bf
commit d69892c91e
2 changed files with 11 additions and 0 deletions
+8
View File
@@ -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;
+3
View File
@@ -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;