Python Forum
keeping logs for every success fail attempt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
keeping logs for every success fail attempt
#7
thanks guys the logging is working really well, this is a snippet of my code

1
2
logger = logging.getLogger(__name__)
logging.basicConfig(filename='password.log', format='%(asctime)s:%(levelname)s:%(message)s', datefmt='%d/%m/%Y %H:%M:%S', encoding='utf-8', level=logging.DEBUG)
and ive made logs for all the if/try/except statements in my code like

1
logger.warning(f'{form.un.data}your current password is wrong, please click back and try again')
now i want to make new log file for every date ie 04/07/2024, 05/07/2024 etc etc, trying to do that now
Reply


Messages In This Thread
RE: keeping logs for every success fail attempt - by robertkwild - Jul-04-2024, 10:48 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  simple if fail, what am I missing? ajkrueger25 2 759 Nov-13-2024, 04:21 AM
Last Post: ajkrueger25
Question PDF Automation with Unique ID + Logs in xls File pollos 1 779 Jul-09-2024, 04:19 PM
Last Post: Pedroski55
  time difference bettwenn logs enkliy 14 3,373 Nov-21-2023, 04:51 PM
Last Post: rob101
  Why does [root.destroy, exit()]) fail after pyinstaller? Rpi Edward_ 4 1,789 Oct-18-2023, 11:09 PM
Last Post: Edward_
  How to calculated how many fail in each site(s) in csv files SamLiu 4 2,295 Sep-26-2022, 06:28 AM
Last Post: SamLiu
  Keeping up with IDEs and Virtual Environments... bytecrunch 7 6,883 Sep-05-2022, 08:04 PM
Last Post: snippsat
  Keeping a value the same despite changing the variable it was equated to TheTypicalDoge 2 2,286 Mar-13-2022, 10:50 PM
Last Post: Yoriz
  Imports that work with Python 3.8 fail with 3.9 and 3.10 4slam 1 3,475 Mar-11-2022, 01:50 PM
Last Post: snippsat
  Bot refuses to count logs. M1racle 0 1,737 Dec-13-2021, 06:42 PM
Last Post: M1racle
  [SOLVED] Why does regex fail cleaning line? Winfried 5 3,499 Aug-22-2021, 06:59 PM
Last Post: Winfried

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020