traffic_replay: logger was ignoring smb.conf log-level
authorTim Beale <timbeale@catalyst.net.nz>
Mon, 22 Oct 2018 21:19:38 +0000 (10:19 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Tue, 30 Oct 2018 23:30:16 +0000 (00:30 +0100)
We were trying to access the debug-level (in python C bindings) before
the smb.conf had been loaded and actually set the debug-level. So it
would default to zero, regardless of what was in the smb.conf.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
script/traffic_replay

index 3f4ff9bf14e45be2e6072e1a35af99f9835f00bb..617a746be1bdb9b501fff6794f5dc48f9bb55045 100755 (executable)
@@ -137,6 +137,7 @@ def main():
         parser.print_usage()
         return
 
+    lp = sambaopts.get_loadparm()
     debuglevel = get_debug_level()
     logger = get_samba_logger(name=__name__,
                               verbose=debuglevel > 3,
@@ -173,7 +174,6 @@ def main():
     if opts.random_seed:
         random.seed(opts.random_seed)
 
-    lp = sambaopts.get_loadparm()
     creds = credopts.get_credentials(lp)
     creds.set_gensec_features(creds.get_gensec_features() | gensec.FEATURE_SEAL)