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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 06 Apr 2010 10:40:33 -0400
Jeff Garzik <jeff@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux