s4-samdb: enable ldb tracing when log level >= 10
authorAndrew Tridgell <tridge@samba.org>
Mon, 21 Sep 2009 22:25:10 +0000 (15:25 -0700)
committerAndrew Tridgell <tridge@samba.org>
Mon, 21 Sep 2009 22:27:05 +0000 (15:27 -0700)
source4/lib/ldb_wrap.c

index 15cf11f942db3735a193ddd9706d69bb58881ff3..74502afde283684c9c8282b9853b711dd8c16205 100644 (file)
@@ -169,6 +169,10 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
                flags |= LDB_FLG_NOSYNC;
        }
 
+       if (DEBUGLVL(10)) {
+               flags |= LDB_FLG_ENABLE_TRACING;
+       }
+
        /* we usually want Samba databases to be private. If we later
           find we need one public, we will need to add a parameter to
           ldb_wrap_connect() */