Some examples of logging in Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This project explores some of the Python logging features compliments of the logging API.

This script shows how I normally use the API: I normally code my configuration right into the script. I prefer not to do that, however. Ideally, I'd like to be able to move my logging configuration to a properties file and role my logs, among other improvements.

This script shows how I can achieve some of those improvements. It uses the logger_cfg_example.cfg file for the logging configuration and it turns out Python does in fact offer a rotating file handler.

Future Considerations

Despite the nice offerings of the logging API, people have still authored other packages like logzero and loguru. Some day, I'd like to spend time looking at those packages to see what they can offer above and beyond the standard logging package.