set custom logger

This commit is contained in:
Robin Müller 2021-10-06 18:00:34 +02:00
parent 3b2caa7326
commit 726935f77b
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 4 additions and 1 deletions

@ -1 +1 @@
Subproject commit b5068ceb033b6a857d463d6d91aa8cbdf07913e9
Subproject commit e441c50809cc18018c57aaf535549f9a2c0b9583

View File

@ -35,7 +35,9 @@ from pus_tm.factory_hook import ccsds_tm_handler
try:
from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler
from tmtccmd.ccsds.handler import CcsdsTmHandler
from tmtccmd.utility.logger import TMTC_LOGGER_NAME
import spacepackets
from spacepackets.log import set_custom_console_logger_name
except ImportError as error:
run_tmtc_commander = None
initialize_tmtc_commander = None
@ -49,6 +51,7 @@ def main():
hook_obj = EiveHookObject()
print(f'-- eive tmtc version {__version__} --')
print(f'-- spacepackets version {spacepackets.__version__} --')
set_custom_console_logger_name(logger_name=TMTC_LOGGER_NAME)
initialize_tmtc_commander(hook_object=hook_obj)
ccsds_handler = CcsdsTmHandler()
ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50)