Skip to content

Commit

Permalink
Update the README for log level 7 debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jeking3 committed Jan 4, 2021
1 parent 8ee3094 commit a0cbda2
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,8 @@ regenerate your recording. If this does not work, there is likely a piece
of information in the recording that is not idempotent, such as a timestamp
or a uuid.

The easiest way to identify this is to record and then playback, scraping the
log messages into two files, and comparing them. Here is an example:
If you set the logging level to 7 (more than DEBUG, which is 10), any mismatch
encountered during playback will be accompanied by a "diff" of the
recorded call and the requested playback call, for example:

$ RECORDING=1 tox -e debug <testname> -- --pdb -s \
-o log_cli=True -o log_cli_level=7 | grep TAPE | tee /tmp/record.txt
...
$ tox -e debug <testname> -- --pdb -s \
-o log_cli=True -o log_cli_level=7 | grep TAPE | tee /tmp/playback.txt
...

When compared side-by-side, it is easier to see what data changed.
$ tox -e debug <testname> -- --pdb -s -o log_cli=True -o log_cli_level=7

0 comments on commit a0cbda2

Please sign in to comment.