Skip to content

Instantly share code, notes, and snippets.

@termie
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save termie/9359230 to your computer and use it in GitHub Desktop.

Select an option

Save termie/9359230 to your computer and use it in GitHub Desktop.
Recipe: Debug Logging in Nova
Serves 1:
- spend one hour attempting every common way of enabling debug or verbose logging in the cli or config
- run_tests.sh? deprecated? use tox? install tox? --debug?
- downgrade one dependency
- try `pip install tox==1.6.1`
- spend another hour attempting every common way of manually hardcoding the log level to be debug
- acquire blob of text: https://gist.githubusercontent.com/termie/9358089/raw/80df96f5d1f0886f672253612972849ef5196886/gistfile1.txt
- hack your venv to install another dependency from trunk source
- like so: https://gist.github.com/termie/9358833
- manually import files looking for import errors
- don't forget to `pip install -r test-requirements.txt` :)
- oslo.log doesn't provide a standard python logging interface!
- manually apply a patch sitting in the queue from a month ago that makes debug logging default in tests
- it's this one: https://review.openstack.org/#/c/71652
- find your logs in .testrepository, the one called tmpXXXXX is your currently running tests
- (optional) use a bunch of command-line bits to see which tests are running as they run
- tox -epy27 -- --parallel --subunit nova.tests.integrated | subunit2pyunit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment