refactor logging usage
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
import logging
|
||||
import os
|
||||
|
||||
from eive_tmtc import EIVE_TMTC_ROOT
|
||||
from tmtccmd import get_console_logger
|
||||
from tmtccmd.fsfw import parse_fsfw_events_csv
|
||||
from tmtccmd.pus.s5_event import EventDictT
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
DEFAULT_EVENTS_CSV_PATH = EIVE_TMTC_ROOT / "config/events.csv"
|
||||
__EVENT_DICT = None
|
||||
|
||||
@ -16,6 +15,6 @@ def get_event_dict() -> EventDictT:
|
||||
if os.path.exists(DEFAULT_EVENTS_CSV_PATH):
|
||||
__EVENT_DICT = parse_fsfw_events_csv(DEFAULT_EVENTS_CSV_PATH)
|
||||
else:
|
||||
LOGGER.warning(f"No Event CSV file found at {DEFAULT_EVENTS_CSV_PATH}")
|
||||
logging.getLogger(__name__).warning(f"No Event CSV file found at {DEFAULT_EVENTS_CSV_PATH}")
|
||||
__EVENT_DICT = dict()
|
||||
return __EVENT_DICT
|
||||
|
Reference in New Issue
Block a user