Skip to content

Commit

Permalink
fix stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
pipiche38 committed Nov 24, 2023
1 parent c5582e5 commit d580b7f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Classes/LoggingManagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ def loggingError(self, thread_name, module, message, nwkid, context):
def loggingBuildContext(self, thread_name, module, message, nwkid, context=None):

_txt = self.PluginHealth.get("Txt", "Not Started")

_stacktrace = str(traceback.format_exc())

_context = {
"Time": int(time.time()),
"PermitToJoin": self.permitTojoin,
Expand All @@ -379,7 +380,7 @@ def loggingBuildContext(self, thread_name, module, message, nwkid, context=None)
"nwkid": nwkid,
"Module": module,
"message": message,
"Stack Trace": str(traceback.format_exc())
"Stack Trace": _stacktrace
}

if nwkid in self.ListOfDevices:
Expand Down Expand Up @@ -477,7 +478,6 @@ def configure_loggers(logger_names, mode):
for logger_name in logger_names:
logging.getLogger(logger_name).setLevel(_set_logging_level)



# Loggers configurations
def configure_zigpy_loggers(mode):
Expand All @@ -490,6 +490,7 @@ def configure_zigpy_loggers(mode):
]
configure_loggers(logger_names, mode)


def configure_zigpy_znp_loggers(mode):
logger_names = [
"zigpy_znp",
Expand All @@ -501,6 +502,7 @@ def configure_zigpy_znp_loggers(mode):
]
configure_loggers(logger_names, mode)


def configure_zigpy_ezsp_loggers(mode):
logger_names = [
"bellows",
Expand All @@ -513,20 +515,23 @@ def configure_zigpy_ezsp_loggers(mode):
]
configure_loggers(logger_names, mode)


def configure_zigpy_zigate_loggers(mode):
logger_names = [
"zigpy_zigate",
"Classes.ZigpyTransport.AppZigate"
]
configure_loggers(logger_names, mode)


def configure_zigpy_deconz_loggers(mode):
logger_names = [
"zigpy_deconz",
"Classes.ZigpyTransport.AppDeconz"
]
configure_loggers(logger_names, mode)


# Main configuration function

def _configure_debug_mode(self, debug_flag, config_name, config_function):
Expand Down

0 comments on commit d580b7f

Please sign in to comment.