diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2018-10-19 16:26:19 +1300 |
---|---|---|
committer | Douglas Bagnall <dbagnall@samba.org> | 2019-01-08 23:55:34 +0100 |
commit | 9e0effc1757cd1c5f839a90eb04c4a481d518207 (patch) | |
tree | 705f490fcb26b390fb482ca74e66c119bb80ecf3 | |
parent | b5d493f92723c1c52616d2497953e4b7da0932ec (diff) | |
download | samba-9e0effc1757cd1c5f839a90eb04c4a481d518207.tar.gz |
traffic: improve debug messages in traffic_replay
tracebacks and less nonsense at higher debug levels.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rwxr-xr-x | script/traffic_replay | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/script/traffic_replay b/script/traffic_replay index f1e8372c8bb..6131ffad2e8 100755 --- a/script/traffic_replay +++ b/script/traffic_replay @@ -234,6 +234,9 @@ def main(): open(opts.traffic_summary, 'w').close() except IOError: # exception info will be added to log automatically + if debuglevel > 0: + import traceback + traceback.print_exc() logger.exception(("the supplied traffic summary destination " "(%s) is not writable" % opts.traffic_summary)) sys.exit() @@ -258,6 +261,9 @@ def main(): opts.duration, opts.replay_rate) except ValueError: + if debuglevel > 0: + import traceback + traceback.print_exc() logger.error(("Could not parse %s, which does not seem to be " "a model generated by script/traffic_learner." % model_file)) @@ -266,13 +272,6 @@ def main(): else: conversations = [] - if debuglevel > 5: - for c in traffic.seq_to_conversations(conversations): - for p in c.packets: - print(" ", p, file=sys.stderr) - - print('=' * 72, file=sys.stderr) - if opts.number_of_users and opts.number_of_users < len(conversations): logger.error(("--number-of-users (%d) is less than the " "number of conversations to replay (%d)" |