ISEPOS-2280 Adjusted example in python base logger

This commit is contained in:
plgmlesniak 2024-09-30 23:59:43 +02:00
parent 039cfe081e
commit 68e32149cc

View File

@ -42,6 +42,10 @@ def getDefaultLogger(name):
--------
logger = getDefaultLogger(__name__)
logger.info("This is an info message.")
try:
raise Exception('Exception for example.')
except Exception as e:
logger.error('An error occurred:', exc_info=True) # Log with stack trace
"""
logger = logging.getLogger(name)