Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
general python help
#1
I have a function
def abc(self):
try:
  handler = logging.FileHandler(logpath)
  handler.setFormatter(formatter)
  logger.addHandler(handler)
 except:
    logger.info("abc")

def xyz(self):
 ..some code..
I am not able to access the logger in except block for func abc.Is there any way such that i can log the error occuring in function abc or
Is it possible to throw the exception to xyz and log it in xyz
Reply


Messages In This Thread
general python help - by saisankalpj - Jul-09-2018, 04:34 PM
RE: general python help - by snippsat - Jul-09-2018, 07:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python can - general question caslor 0 1,139 Jul-14-2022, 05:21 PM
Last Post: caslor
  General question about serialization/deserialization in python local 1 1,871 Jan-28-2020, 04:35 AM
Last Post: Larz60+
  General reference for Python FLAJA 1 1,632 May-22-2019, 06:41 AM
Last Post: heiner55
  Python with email forms, and frontend code in general MattH 4 3,458 Feb-18-2018, 03:29 AM
Last Post: MattH

Forum Jump:

User Panel Messages

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