chunkd: End-to-end verbosity
PATCH 2/3 chunkd: End-to-end verbosity
Signed-off-by Pete Zaitcev <[email protected]>
--- server/cldu.c | 3 ++- server/server.c | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-)
commit 764bd81a304fd3b961e7c3661a498ba0f6565a51
Author: Master <[email protected]> Date: Wed Mar 31 18:16:18 2010 -0600
End-2-end verbosity.
server/cldu.c +2 -1
@@ -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",
server/server.c +6 -3
@@ -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 ();