logging module now used to log interface events.

register, deregister method aliases added to Subject class.
This commit is contained in:
onyx-and-iris
2022-09-28 18:13:07 +01:00
parent db96872965
commit 23bc15e437
5 changed files with 38 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
import logging
import socket
import time
from abc import ABCMeta, abstractmethod
@@ -21,6 +22,7 @@ class VbanCmd(metaclass=ABCMeta):
1000000, 1500000, 2000000, 3000000,
]
# fmt: on
logger = logging.getLogger("vbancmd.vbancmd")
def __init__(self, **kwargs):
for attr, val in kwargs.items():
@@ -57,6 +59,8 @@ class VbanCmd(metaclass=ABCMeta):
self.updater = Updater(self)
self.updater.start()
self.logger.info(f"{type(self).__name__}: Successfully logged into {self}")
def _set_rt(
self,
id_: str,