Skip to content

Commit

Permalink
Add fallback log name for exceptions (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Feb 29, 2024
1 parent fdebf06 commit c6893b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions matter_server/server/device_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ async def remove_node(self, node_id: int) -> None:
except ChipStackError as err:
LOGGER.warning(
"Removing current fabric from device failed: %s",
str(err),
str(err) or err.__class__.__name__,
# only log stacktrace if we have debug logging enabled
exc_info=err if LOGGER.isEnabledFor(logging.DEBUG) else None,
)
Expand Down Expand Up @@ -1102,7 +1102,7 @@ async def _setup_node(self, node_id: int) -> None:
LOGGER.warning(
"Unable to interview Node %s: %s",
node_id,
str(err),
str(err) or err.__class__.__name__,
# log full stack trace if debug logging is enabled
exc_info=err if LOGGER.isEnabledFor(logging.DEBUG) else None,
)
Expand All @@ -1116,7 +1116,7 @@ async def _setup_node(self, node_id: int) -> None:
LOGGER.warning(
"Unable to subscribe to Node %s: %s",
node_id,
str(err),
str(err) or err.__class__.__name__,
# log full stack trace if debug logging is enabled
exc_info=err if LOGGER.isEnabledFor(logging.DEBUG) else None,
)
Expand Down

0 comments on commit c6893b7

Please sign in to comment.