Json logger compatible with logger
git clone https://github.com/Sagacify/logger-py
pip install sagalogger
>>>>from sagalogger import get_logger
>>>>test = get_logger("test")
>>>>test.warn("ATTENTION")
{"name": "ipython", "data": null, "meta": null, "event": "ATTENTION", "time": "2016-09-02T18:04:40Z", "msg": "", "hostname": "MacBook-Pro-de-Augustin.local", "level": 40, "module": "test", "pid": 96277, "v": 0}
All logger functions (trace, debug, info, warn, error, fatal) expect 1 -> 3 arguments as follow:
- event: Should be a string(not enforced) identifying the event.
- data: the data that was used in that piece of the program.
- meta: Any meta information that could be of interest.
To run the tests and watch the sources for any changes, run:
docker-compose up
To run the style-tests, run:
docker-compose run py flake8
To output coverage information in html, run:
docker-compose run py pytest --cov=src --cov-report html:coverage/html