1
0
mirror of https://github.com/thingsboard/thingsboard-gateway synced 2025-10-26 22:31:42 +08:00

Fixed TbLogger initialization

This commit is contained in:
samson0v
2024-02-29 14:53:24 +02:00
parent f2af60a141
commit c0717bdfd0

View File

@@ -53,8 +53,9 @@ class TbLogger(logging.Logger):
self.errors = 0
self.attr_name = self.name + '_ERRORS_COUNT'
self._is_on_init_state = True
self._errors_sender_thread = Thread(name=str.format('%r Log Errors Sender', self.name), daemon=True, target=self._send_errors)
self._errors_sender_thread.start()
if self._gateway:
self._send_errors_thread = Thread(target=self._send_errors, name='Send Errors Thread', daemon=True)
self._send_errors_thread.start()
def reset(self):
"""