summaryrefslogtreecommitdiff
path: root/lib/util/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/debug.c')
-rw-r--r--lib/util/debug.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/util/debug.c b/lib/util/debug.c
index 996efdff7e..c8a22149a2 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -182,12 +182,24 @@ _PUBLIC_ void reopen_logs(void)
}
}
+/* setup for logging of talloc warnings */
+static void talloc_log_fn(const char *msg)
+{
+ DEBUG(0,("%s", msg));
+}
+
+void debug_setup_talloc_log(void)
+{
+ talloc_set_log_fn(talloc_log_fn);
+}
+
/**
control the name of the logfile and whether logging will be to stdout, stderr
or a file
*/
_PUBLIC_ void setup_logging(const char *prog_name, enum debug_logtype new_logtype)
{
+ debug_setup_talloc_log();
if (state.logtype < new_logtype) {
state.logtype = new_logtype;
}