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 fancylog
N.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]
git clone https://github.com/neuroinformatics-unit/fancylog
pip install -e .
python fancylog/example.py /path/to/output/log/dir
If you run the example, you should get a log file that resembles this