refactor logging usage

This commit is contained in:
2023-02-01 11:17:04 +01:00
parent 3eeb58182b
commit 7b5df331ef
22 changed files with 105 additions and 113 deletions

View File

@ -5,6 +5,7 @@
@author J. Meier
@date 15.02.2021
"""
import logging
import struct
from eive_tmtc.config.definitions import CustomServiceList
@ -18,9 +19,6 @@ from tmtccmd.config.tmtc import (
from tmtccmd.tc import service_provider, DefaultPusQueueHelper
from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd
from tmtccmd.tc.decorator import ServiceProviderParams
from tmtccmd import get_console_logger
LOGGER = get_console_logger()
class OpCode:
@ -90,7 +88,7 @@ def pack_solar_array_deployment_test_into(p: ServiceProviderParams):
def prompt_burn_time() -> int:
burn_time = int(input("Please specify burn time in seconds [0-120 secs]: "))
if burn_time < 0 or burn_time > 120:
LOGGER.warning(f"Invalid burn time {burn_time}")
logging.getLogger(__name__).warning(f"Invalid burn time {burn_time}")
return -1
return burn_time
@ -102,7 +100,7 @@ def prompt_dry_run() -> int:
elif dry_run in ["no", "n", "0"]:
return 0
else:
LOGGER.warning("Invalid input for dry run parameter")
logging.getLogger(__name__).warning("Invalid input for dry run parameter")
return -1