Python Flask dynamic logging level change does not work properly
I’ve been struggling with this issue for a while, and just can’t get a grip on what’s wrong. I am making my custom logger class by going through a bunch of tutorial articles on this subject. Everything is working pretty well so far, but I have this unexpected issue with the dynamic change of the logger level: it does not go below the initial logging level, with which the app was started. If I start it at INFO, the changes work perfectly fine when I go up, to WARNING or ERROR, but if I set it to DEBUG, it still cuts off the logs at the INFO. The most confusing part is that from the logs I also see that the logger level seems to be changing just fine.
Write Login logout logs on Flask python
I have login logout functions on Flask. I need to write logs to .txt format and show them in web page in table. For login I did not write the login, but for logout it is ready and logs write to audit_logs.txt file, but I can not see them in the audit_logs.html file. I need to write logs when user login and logout. Please assist to solve the issue.