[Patch 2/3] chunkd: End-to-end verbosity

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

 



Signed-Off-By: Pete Zaitcev <zaitcev@xxxxxxxxxx>

---
 server/cldu.c   |    3 ++-
 server/server.c |    9 ++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

commit 764bd81a304fd3b961e7c3661a498ba0f6565a51
Author: Master <zaitcev@xxxxxxxxxxxxxxxxxx>
Date:   Wed Mar 31 18:16:18 2010 -0600

    End-2-end verbosity.

diff --git a/server/cldu.c b/server/cldu.c
index 51d01a3..b2d3388 100644
--- a/server/cldu.c
+++ b/server/cldu.c
@@ -319,7 +319,8 @@ static int cldu_set_cldc(struct cld_session *cs, int newactive)
 		       hp->host, hp->port);
 
 	cs->nsess = ncld_sess_open(hp->host, hp->port, &error,
-				   cldu_sess_event, cs, "tabled", "tabled");
+				   cldu_sess_event, cs, "tabled", "tabled",
+				   &cldu_hail_log);
 	if (cs->nsess == NULL) {
 		if (error < 1000) {
 			applog(LOG_ERR, "ncld_sess_open(%s,%u) error: %s",
diff --git a/server/server.c b/server/server.c
index 69f3973..38fa5b6 100644
--- a/server/server.c
+++ b/server/server.c
@@ -74,6 +74,8 @@ static struct argp_option options[] = {
 	  "Run in foreground, do not fork" },
 	{ "pid", 'P', "FILE", 0,
 	  "Write daemon process id to FILE" },
+	{ "verbose", 'v', NULL, 0,
+	  "Enable verbosity in libcldc" },
 	{ "strict-free", 1001, NULL, 0,
 	  "For memory-checker runs.  When shutting down server, free local "
 	  "heap, rather than simply exit(2)ing and letting OS clean up." },
@@ -186,6 +188,9 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
 	case 'P':
 		chunkd_srv.pid_file = strdup(arg);
 		break;
+	case 'v':
+		cldu_hail_log.verbose = true;
+		break;
 	case 1001:			/* --strict-free */
 		strict_free = true;
 		break;
@@ -1736,9 +1741,7 @@ int main (int argc, char *argv[])
 	if (use_syslog)
 		openlog(PROGRAM_NAME, LOG_PID, LOG_LOCAL3);
 	if (debugging)
-		applog(LOG_INFO, "Verbose debug output enabled");
-
-	cldu_hail_log.verbose = debugging;
+		applog(LOG_INFO, "Debug output enabled");
 
 	g_thread_init(NULL);
 	chunkd_srv.bigmutex = g_mutex_new();
--
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