Instead of logging to a hard-coded path /var/log/nvx.log use the system's logging facilities via journald
python-systemd already has a handler.
import logging
from systemd import journal
logger = logging.getLogger('custom_logger_name')
logger.addHandler(journal.JournalHandler(SYSLOG_IDENTIFIER='custom_unit_name'))
logger.warning("Some message: %s", 'detail')
Instead of logging to a hard-coded path
/var/log/nvx.loguse the system's logging facilities via journaldpython-systemd already has a handler.