Fancier logging with python.
Uses the standard python logging library, but (optionally) in addition:
- Logs code when using the multiprocessing module using multiprocessing-logging
- Uses GitPython to log information about the git environment.
- Logs the command-line arguments used to run the software
- Logs object attributes
pip install fancylogN.B. For the git logging to work, you need to have git and the GitPython package installed. The latter can be installed along with fancylog using:
pip install fancylog[git]To enable logging when using the multiprocessing module, install using:
pip install fancylog[multiprocessing]git clone https://github.com/neuroinformatics-unit/fancylog pip install -e . python fancylog/example.py /path/to/output/log/dirIf you run the example, you should get a log file that resembles this