немного поправил логгирование сервисов modbus
This commit is contained in:
parent
71e9fc37e9
commit
afaac62246
@ -54,7 +54,7 @@ class MbService(Thread):
|
||||
# if self.log_type == 'on-change':
|
||||
# pass
|
||||
# else:
|
||||
print(f"[MbService:{self.__class__.name}] service started!")
|
||||
print(f"[{datetime.now().isoformat()}] MbService:{type(self).__name__}: service started!")
|
||||
self._init_state()
|
||||
|
||||
last_query = datetime.now()
|
||||
@ -66,7 +66,7 @@ class MbService(Thread):
|
||||
if self._check_need_save():
|
||||
self._push_current_state()
|
||||
except Exception as ex:
|
||||
print(f"[MbService:{self.__class__.name}] Exception: {ex}")
|
||||
print(f"[{datetime.now().isoformat()}] MbService:{type(self).__name__}: Exception: {ex}")
|
||||
|
||||
# вычислим время до следующего опроса и подождем
|
||||
# время следующего опроса
|
||||
|
Loading…
x
Reference in New Issue
Block a user