aboutsummaryrefslogtreecommitdiffstats
path: root/slowcgi.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--slowcgi.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/slowcgi.c b/slowcgi.c
index e26d20a..5559d05 100644
--- a/slowcgi.c
+++ b/slowcgi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slowcgi.c,v 1.60 2021/04/20 07:35:42 claudio Exp $ */
+/* $OpenBSD: slowcgi.c,v 1.61 2021/09/02 13:18:04 florian Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
* Copyright (c) 2013 Florian Obser <florian@openbsd.org>
@@ -277,6 +277,7 @@ usage(void)
struct timeval timeout = { TIMEOUT_DEFAULT, 0 };
struct slowcgi_proc slowcgi_proc;
int debug = 0;
+int verbose = 0;
int on = 1;
char *fcgi_socket = "/var/www/run/slowcgi.sock";
@@ -309,7 +310,7 @@ main(int argc, char *argv[])
}
}
- while ((c = getopt(argc, argv, "dp:s:U:u:")) != -1) {
+ while ((c = getopt(argc, argv, "dp:s:U:u:v")) != -1) {
switch (c) {
case 'd':
debug++;
@@ -326,6 +327,9 @@ main(int argc, char *argv[])
case 'u':
slowcgi_user = optarg;
break;
+ case 'v':
+ verbose++;
+ break;
default:
usage();
/* NOTREACHED */
@@ -1282,9 +1286,10 @@ syslog_info(const char *fmt, ...)
void
syslog_debug(const char *fmt, ...)
{
- va_list ap;
-
- va_start(ap, fmt);
- vsyslog(LOG_DEBUG, fmt, ap);
- va_end(ap);
+ if (verbose > 0) {
+ va_list ap;
+ va_start(ap, fmt);
+ vsyslog(LOG_DEBUG, fmt, ap);
+ va_end(ap);
+ }
}