make log interval configurable at the top

This commit is contained in:
Robin Müller 2022-08-16 16:17:36 +02:00
parent 19b35f7e18
commit f85694de02
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -61,6 +61,11 @@ from pus_tc.procedure_packer import handle_default_procedure
LOGGER = get_console_logger()
# Put rotating file logger parameters here for quick changes
ROTATING_TIMED_LOGGER_INTERVAL_WHEN = TimedLogWhen.PER_MINUTE
ROTATING_TIMED_LOGGER_INTERVAL = 30
class PusHandler(SpecificApidHandlerBase):
def __init__(
self,
@ -198,7 +203,10 @@ def main():
sys.exit(0)
tmtc_logger = RegularTmtcLogWrapper()
printer = FsfwTmTcPrinter(tmtc_logger.logger)
raw_logger = RawTmtcTimedLogWrapper(when=TimedLogWhen.PER_HOUR, interval=2)
raw_logger = RawTmtcTimedLogWrapper(
when=ROTATING_TIMED_LOGGER_INTERVAL_WHEN,
interval=ROTATING_TIMED_LOGGER_INTERVAL
)
pus_verificator = PusVerificator()
ccsds_handler, tc_handler = setup_tmtc(
pus_verificator, printer, raw_logger, setup_wrapper.params.use_gui