Created
February 17, 2020 02:41
-
-
Save brettbeeson/7f4eddba85f3f2822d8cf03a78f045e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import logging | |
from systemd import journal | |
log = logging.getLogger("pijuice") | |
log.setLevel(logging.INFO) | |
handler = journal.JournaldLogHandler() | |
formatter = logging.Formatter('%(module)s.%(funcName)s: %(message)s') | |
handler.setFormatter(formatter) | |
log.addHandler(handler) | |
log.info(str(sys.argv)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment