Skip to content

Commit be83099

Browse files
committed
Change default log level to INFO
Remove default logging.basicConfig in Communication class init; it has no effect and should be set once in main.py anyway.
1 parent 6c62a69 commit be83099

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/python/main/ayab/engine/communication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ class Communication(object):
7272
def __init__(self, serial: Optional[serial.Serial | WebsocketSerial] = None):
7373
"""Create an AyabCommunication object,
7474
with an optional serial communication object."""
75-
logging.basicConfig(level=logging.DEBUG)
7675
self.logger = logging.getLogger(type(self).__name__)
76+
self.logger.setLevel(logging.DEBUG)
7777
self.__ser = serial
7878
self.__driver = sliplib.Driver()
7979
self.rx_msg_list: list[bytes] = list()

src/main/python/main/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def configure_logger(self) -> None:
5353
logfile = path.join(self.userdata_path, "ayab_log.txt")
5454
logging.basicConfig(
5555
filename=logfile,
56-
level=logging.DEBUG,
56+
level=logging.INFO,
5757
format="%(asctime)s %(name)-8s %(levelname)-8s %(message)s",
5858
datefmt="%y-%m-%d %H:%M:%S",
5959
)

0 commit comments

Comments
 (0)