Skip to content

Commit

Permalink
Enable faulthandler to provide more fault information
Browse files Browse the repository at this point in the history
  • Loading branch information
liuh-80 committed Nov 20, 2023
1 parent 347a6e4 commit 3042748
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sonic_ax_impl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import json
import logging.handlers

import faulthandler

# configure logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
logger.addHandler(logging.NullHandler())

# enable faulthandler to provide more information for debug
# after enable faulthandler, the file 'stderr' will be remembered by faulthandler:
# https://docs.python.org/dev/library/faulthandler.html#issue-with-file-descriptors
faulthandler.enable()

0 comments on commit 3042748

Please sign in to comment.