I work with Flask and Foreman for hosting Heroku. I start my local server by typing foreman start . My problem is that I want to see the log error messages that my code produces, but I have not found the correct way to do this.
I tried with some code that I found in the Flask documentation, but this doesn't work either:
import logging from FileHandler import FileHandler file_handler = FileHandler("log.txt") file_handler.setLevel(logging.WARNING) app.logger.addHandler(file_handler)
Any idea how to read error messages when starting Flask using foreman start ?
source share