# logger alrady exists, so refrain from adding more handlers
returnlogger
ifloglevel:
_level=getattr(logging,loglevel)
logger.setLevel(_level)
...
...
@@ -84,14 +88,14 @@ class LogLine:
defparse_line(logline):
_split=logline.strip().split("-")
assertlen(_split)>=3,f"A logged line should consists of a least three elements with the format [TIME - LOGLEVEL - MESSAGE] but got [{logline.strip()}]"
assertlen(_split)>=4,f"A logged line should consists of a least four elements with the format [TIME - LOGLEVEL - MESSAGE] but got [{logline.strip()}]"