fixed disable logging

This commit is contained in:
roberto@oneiric64
2012-02-07 05:34:28 +01:00
parent 1e657f0b77
commit 87a165477f
2 changed files with 9 additions and 1 deletions
+8 -1
View File
@@ -146,7 +146,7 @@ static struct uwsgi_option uwsgi_base_options[] = {
{"signal-bufsize", required_argument, 0, "set buffer size for signal queue", uwsgi_opt_set_int, &uwsgi.signal_bufsize, 0},
{"signals-bufsize", required_argument, 0, "set buffer size for signal queue", uwsgi_opt_set_int, &uwsgi.signal_bufsize, 0},
{"disable-logging", no_argument, 'L', "disable request logging", uwsgi_opt_dyn_true, (void *) UWSGI_OPTION_LOGGING, 0},
{"disable-logging", no_argument, 'L', "disable request logging", uwsgi_opt_dyn_false, (void *) UWSGI_OPTION_LOGGING, 0},
{"pidfile", required_argument, 0, "create pidfile (before privileges drop)", uwsgi_opt_set_str, &uwsgi.pidfile,0},
{"pidfile2", required_argument, 0, "create pidfile (after privileges drop)", uwsgi_opt_set_str, &uwsgi.pidfile2,0},
@@ -3215,6 +3215,13 @@ void uwsgi_opt_dyn_true(char *opt, char *value, void *key) {
uwsgi.shared->options[dyn_opt_id] = 1;
}
void uwsgi_opt_dyn_false(char *opt, char *value, void *key) {
long *fake_ptr = (long *) key;
uint8_t dyn_opt_id = (long) fake_ptr;
uwsgi.shared->options[dyn_opt_id] = 0;
}
void uwsgi_opt_set_str(char *opt, char *value, void *key) {
char **ptr = (char **) key;
*ptr = (char *) value;
+1
View File
@@ -2499,6 +2499,7 @@ void uwsgi_opt_set_64bit(char *, char *, void *);
void uwsgi_opt_set_megabytes(char *, char *, void *);
void uwsgi_opt_set_dyn(char *, char *, void *);
void uwsgi_opt_dyn_true(char *, char *, void *);
void uwsgi_opt_dyn_false(char *, char *, void *);
void uwsgi_opt_set_placeholder(char *, char *, void *);
void uwsgi_opt_add_shared_socket(char *, char *, void *);
void uwsgi_opt_add_socket(char *, char *, void *);