I am creating a website where users login to the website. I would like to record the users ip address if they fail to login with the correct username and password. I understand the logging in python allows for logging the time of the incorrect entry.(using format='%(asctime)s') How do I go about logging the ip address as well. Thanks so much!
Asked
Active
Viewed 20 times
0
-
1Basically, the answer to your question already exist in official docs. Check [Injecting Request Information](https://flask.palletsprojects.com/en/2.0.x/logging/#injecting-request-information). – Olvin Roght Mar 07 '22 at 20:57