Re: [Patch 1/3] CLD: End-to-end verbosity

Pete Zaitcev <[email protected]>
Newsgroups org.kernel.vger.hail-devel
Message-ID <[email protected]>
On Tue, 06 Apr 2010 10:40:33 -0400
Jeff Garzik <[email protected]> wrote:

> The debug levels are
> 
> 	0: key messages affecting server operation, only
> 	1: debugging output enabled, sans per-packet output
> 	2: debugging output enabled, including per-packet output

The previous patch did just that:

@@ -918,9 +917,17 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
 		cld_srv.data_dir = arg;
 		break;
 	case 'D':
-		if (atoi(arg) >= 0 && atoi(arg) <= 2)
-			srv_log.verbose = atoi(arg);
-		else {
+		switch (atoi(arg)) {
+		case 0:
+			break;
+		case 1:
+			srv_log.debug = true;
+			break;
+		case 2:
+			srv_log.debug = true;
+			srv_log.verbose = true;
+			break;
+		default:
 			fprintf(stderr, "invalid debug level: '%s'\n", arg);
 			argp_usage(state);
 		}

Why did you reject it?

> ... the user interface you have created gives the user two "knobs" 

I was your idea, not mine. Do you want me to REMOVE -v from
cldcli now?

-- Pete
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.