Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windows compatibility
#16
Again, there is misunderstanding - the fact that you have set a logger, DOES NOT mean that it will catch/handle automatically any error.
Error handling and logging are two different things.

the fact that you set this particular WatchedFileHandler handler to DEBUG level means that any logging will be done to this handler (because it will handle DEBUG level and above). Imagine you have another handler (e.g. console handler) set to different level, e.g. info, in which case it will handle any logs at level INFO and above, but not DEBUG - i.e. DEBUG level will be written in the file, but not to console.

Again, having a logger is NOT error handling (although you will certainly write to log if you get error). You can handle the errors, without logging them/anything and also you can have a logger and not handle any error (like you do in your code).

read https://docs.python.org/3/tutorial/errors.html and https://realpython.com/python-exceptions/
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
Windows compatibility - by Astrikor - Aug-03-2021, 08:52 AM
RE: Windows compatibility - by Larz60+ - Aug-03-2021, 09:49 AM
RE: Windows compatibility - by Astrikor - Aug-03-2021, 10:12 AM
RE: Windows compatibility - by DeaD_EyE - Aug-03-2021, 10:27 AM
RE: Windows compatibility - by supuflounder - Aug-03-2021, 10:38 AM
RE: Windows compatibility - by Astrikor - Aug-03-2021, 11:39 AM
RE: Windows compatibility - by Astrikor - Aug-04-2021, 08:31 AM
RE: Windows compatibility - by jefsummers - Aug-04-2021, 11:14 AM
RE: Windows compatibility - by Astrikor - Aug-04-2021, 12:18 PM
RE: Windows compatibility - by ndc85430 - Aug-04-2021, 12:40 PM
RE: Windows compatibility - by Astrikor - Aug-04-2021, 03:02 PM
RE: Windows compatibility - by Astrikor - Aug-10-2021, 09:03 AM
RE: Windows compatibility - by buran - Aug-10-2021, 09:56 AM
RE: Windows compatibility - by Astrikor - Aug-10-2021, 10:03 AM
RE: Windows compatibility - by ndc85430 - Aug-10-2021, 10:14 AM
RE: Windows compatibility - by buran - Aug-10-2021, 10:21 AM
RE: Windows compatibility - by Astrikor - Aug-10-2021, 10:55 AM
RE: Windows compatibility - by buran - Aug-10-2021, 11:03 AM
RE: Windows compatibility - by Astrikor - Aug-10-2021, 11:27 AM
RE: Windows compatibility - by Luckk - Aug-10-2021, 01:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  deactivate compatibility pop up with excel files Krszt 0 1,945 Mar-19-2019, 06:39 AM
Last Post: Krszt
  Check Python version from inside script? Run Pythons script in v2 compatibility mode? pstein 2 9,875 Jul-07-2017, 08:59 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

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