Skip to content

Instantly share code, notes, and snippets.

@brettbeeson
Created February 17, 2020 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brettbeeson/7f4eddba85f3f2822d8cf03a78f045e2 to your computer and use it in GitHub Desktop.
Save brettbeeson/7f4eddba85f3f2822d8cf03a78f045e2 to your computer and use it in GitHub Desktop.
#!/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