diff options
Diffstat (limited to 'ctdb/common/cmdline.c')
-rw-r--r-- | ctdb/common/cmdline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ctdb/common/cmdline.c b/ctdb/common/cmdline.c index 59e8722196c..cd59d84757b 100644 --- a/ctdb/common/cmdline.c +++ b/ctdb/common/cmdline.c @@ -144,6 +144,13 @@ struct ctdb_context *ctdb_cmdline_client(struct tevent_context *ev, } } + /* Set the debug level */ + if (isalpha(ctdb_cmdline.debuglevel[0]) || ctdb_cmdline.debuglevel[0] == '-') { + LogLevel = get_debug_by_desc(ctdb_cmdline.debuglevel); + } else { + LogLevel = strtol(ctdb_cmdline.debuglevel, NULL, 0); + } + ret = ctdb_socket_connect(ctdb); if (ret != 0) { fprintf(stderr, __location__ " Failed to connect to daemon\n"); |