forked from episodes-platform/shared-snippets
feature/ISEPOS-2280-mechanizm-raportowania-informacji-z-aplikacji-do-pliku-z-logami #1
@ -42,6 +42,10 @@ def getDefaultLogger(name):
|
|||||||
--------
|
--------
|
||||||
logger = getDefaultLogger(__name__)
|
logger = getDefaultLogger(__name__)
|
||||||
logger.info("This is an info message.")
|
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)
|
logger = logging.getLogger(name)
|
||||||
|
Loading…
Reference in New Issue
Block a user