summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ctdb/include/ctdb_private.h1
-rw-r--r--ctdb/server/ctdb_daemon.c5
-rw-r--r--ctdb/server/ctdb_logging.c45
3 files changed, 0 insertions, 51 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index d63b1941244..6d3d20a7262 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -695,7 +695,6 @@ struct ctdb_log_state *ctdb_vfork_with_logging(TALLOC_CTX *mem_ctx,
void *logfn_private, pid_t *pid);
int ctdb_set_child_logging(struct ctdb_context *ctdb);
-int ctdb_init_tevent_logging(struct ctdb_context *ctdb);
/* from ctdb_logging_file.c */
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 0d24e215bec..ffee7530c43 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1283,11 +1283,6 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
tevent_loop_allow_nesting(ctdb->ev);
ctdb_tevent_trace_init();
tevent_set_trace_callback(ctdb->ev, ctdb_tevent_trace, ctdb);
- ret = ctdb_init_tevent_logging(ctdb);
- if (ret != 0) {
- DEBUG(DEBUG_ALERT,("Failed to initialize TEVENT logging\n"));
- exit(1);
- }
/* set up a handler to pick up sigchld */
if (ctdb_init_sigchld(ctdb) == NULL) {
diff --git a/ctdb/server/ctdb_logging.c b/ctdb/server/ctdb_logging.c
index 87dbd3be8ea..296f842b246 100644
--- a/ctdb/server/ctdb_logging.c
+++ b/ctdb/server/ctdb_logging.c
@@ -330,48 +330,3 @@ int ctdb_set_child_logging(struct ctdb_context *ctdb)
return 0;
}
-
-
-/*
- * set up a log handler to catch logging from TEVENT
- */
-static void ctdb_tevent_logging(void *private_data,
- enum tevent_debug_level level,
- const char *fmt,
- va_list ap) PRINTF_ATTRIBUTE(3, 0);
-static void ctdb_tevent_logging(void *private_data,
- enum tevent_debug_level level,
- const char *fmt,
- va_list ap)
-{
- enum debug_level lvl = DEBUG_CRIT;
-
- switch (level) {
- case TEVENT_DEBUG_FATAL:
- lvl = DEBUG_CRIT;
- break;
- case TEVENT_DEBUG_ERROR:
- lvl = DEBUG_ERR;
- break;
- case TEVENT_DEBUG_WARNING:
- lvl = DEBUG_WARNING;
- break;
- case TEVENT_DEBUG_TRACE:
- lvl = DEBUG_DEBUG;
- break;
- }
-
- if (lvl <= DEBUGLEVEL) {
- dbgtext_va(fmt, ap);
- }
-}
-
-int ctdb_init_tevent_logging(struct ctdb_context *ctdb)
-{
- int ret;
-
- ret = tevent_set_debug(ctdb->ev,
- ctdb_tevent_logging,
- ctdb);
- return ret;
-}