summaryrefslogtreecommitdiffstats
path: root/ctdb/common
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2013-08-30 23:38:15 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-10-04 15:15:35 +1000
commite229ff613379e6ae555dc0282237deaaa9d2206e (patch)
treee86d7edd97e78d5675d4a878f9edaa5f88a9abe4 /ctdb/common
parent7a8337a01d83232f72ff5d1cefd7394c50dde348 (diff)
downloadsamba-e229ff613379e6ae555dc0282237deaaa9d2206e.tar.gz
samba-e229ff613379e6ae555dc0282237deaaa9d2206e.tar.xz
samba-e229ff613379e6ae555dc0282237deaaa9d2206e.zip
common: Fix setting of debug level in the client code
Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 299fa487549e36572b757852d21471f9e23f6e8f)
Diffstat (limited to 'ctdb/common')
-rw-r--r--ctdb/common/cmdline.c7
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");