First of all, wonderful post.
I'm working on a Flask application right now: first time with Python and I was looking for useful information about how to write logs the right way when I saw this post — awesome!
Anyway, I tried to copy & paste the code but it looks like the logger object doesn't care about the format you passed to logging.basicConfig if you are using the FileHandler and you've to explicitly call .setFormatter to make it know.
log_formatter = logging.Formatter('%(asctime)s - %(levelname)s --: %(message)s')
file_handler = logging.FileHandler('logfile')
Might wanna look at the docs at the app specific logger flask.pocoo.org/docs/1.0/logging/ it also shows how to do some useful stuff like access library loggers and such
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.