Skip to content

Commit

Permalink
Enable faulthandler to provide more fault information (#301)
Browse files Browse the repository at this point in the history
Enable faulthandler to provide more fault information.

#### Work item tracking
Microsoft ADO (number only): 17637258

**- What I did**
Enable faulthandler to provide more fault information.

**- How I did it**
Enable faulthandler when snmp-subagent startup.

**- How to verify it**
Pass all UT

**- Description for the changelog**
Enable faulthandler to provide more fault information.
  • Loading branch information
liuh-80 authored and qiluo-msft committed Dec 2, 2023
1 parent 77e9374 commit 5a73df0
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 5a73df0

Please sign in to comment.