refactor logging usage
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
@author J. Meier
|
||||
@date 06.03.2021
|
||||
"""
|
||||
import logging
|
||||
import struct
|
||||
import enum
|
||||
|
||||
@ -16,7 +17,6 @@ from tmtccmd.config.tmtc import (
|
||||
OpCodeEntry,
|
||||
TmtcDefinitionWrapper,
|
||||
)
|
||||
from tmtccmd.logging import get_console_logger
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
@ -24,7 +24,7 @@ from eive_tmtc.utility.input_helper import InputHelper
|
||||
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
|
||||
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
MANUAL_INPUT = "1"
|
||||
|
||||
@ -324,7 +324,7 @@ def prepare_replay_write_sequence_cmd(object_id: bytes) -> bytearray:
|
||||
|
||||
|
||||
def get_obc_file() -> str:
|
||||
LOGGER.info("Specify OBC file ")
|
||||
_LOGGER.info("Specify OBC file ")
|
||||
input_helper = InputHelper(flash_write_file_dict)
|
||||
key = input_helper.get_key()
|
||||
if key == MANUAL_INPUT:
|
||||
@ -335,7 +335,7 @@ def get_obc_file() -> str:
|
||||
|
||||
|
||||
def get_mpsoc_file() -> str:
|
||||
LOGGER.info("Specify MPSoC file")
|
||||
_LOGGER.info("Specify MPSoC file")
|
||||
input_helper = InputHelper(mpsoc_file_dict)
|
||||
key = input_helper.get_key()
|
||||
if key == MANUAL_INPUT:
|
||||
@ -346,7 +346,7 @@ def get_mpsoc_file() -> str:
|
||||
|
||||
|
||||
def get_sequence_file() -> str:
|
||||
LOGGER.info("Specify sequence file")
|
||||
_LOGGER.info("Specify sequence file")
|
||||
input_helper = InputHelper(SEQ_FILE_DICT)
|
||||
key = input_helper.get_key()
|
||||
if key == MANUAL_INPUT:
|
||||
|
@ -7,6 +7,7 @@
|
||||
@date 10.07.2021
|
||||
"""
|
||||
import enum
|
||||
import logging
|
||||
import struct
|
||||
|
||||
from eive_tmtc.config.object_ids import PLOC_SUPV_ID, get_object_ids
|
||||
@ -16,7 +17,6 @@ from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
||||
from tmtccmd.config import TmtcDefinitionWrapper
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider, OpCodeEntry
|
||||
from tmtccmd.logging import get_console_logger
|
||||
from tmtccmd.tc import service_provider
|
||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||
from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode
|
||||
@ -24,7 +24,7 @@ from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
from eive_tmtc.utility.input_helper import InputHelper
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
latchup_id_dict = {
|
||||
"0": "0.85V",
|
||||
@ -698,7 +698,7 @@ def pack_logging_set_topic(object_id: bytes) -> bytearray:
|
||||
|
||||
|
||||
def get_update_file() -> str:
|
||||
LOGGER.info("Specify update file ")
|
||||
_LOGGER.info("Specify update file ")
|
||||
input_helper = InputHelper(update_file_dict)
|
||||
key = input_helper.get_key()
|
||||
if key == HARDCODED:
|
||||
@ -711,7 +711,7 @@ def get_update_file() -> str:
|
||||
|
||||
|
||||
def get_event_buffer_path() -> str:
|
||||
LOGGER.info("Specify path where to store event buffer file ")
|
||||
_LOGGER.info("Specify path where to store event buffer file ")
|
||||
input_helper = InputHelper(event_buffer_path_dict)
|
||||
key = input_helper.get_key()
|
||||
if key == MANUAL_INPUT:
|
||||
|
Reference in New Issue
Block a user