Opened 7 years ago
Closed 7 years ago
#13487 closed Bug Report - General (fixed)
python bindings do not support the systemd-journal logging option (--systemd-journal)
| Reported by: | Gary Buhrmaster | Owned by: | Bill Meek |
|---|---|---|---|
| Priority: | minor | Milestone: | 31.0 |
| Component: | Bindings - Python | Version: | Master Head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
In what probably should have been a (co-)requirement before committing the patches from #12663 the python bindings were never updated to support journal logging.
I will note that one may need to make the import of the systemd.journal library inside a try/except to handle non-Linux OS's (I have not checked if there is a dummy implementation on FreeBSD or MacOS or Windows, but would not be surprised if they do not exist there).
Attachments (2)
Change History (6)
by , 7 years ago
| Attachment: | logging_systemd-journal_pull_request_182.path added |
|---|
comment:1 by , 7 years ago
by , 7 years ago
| Attachment: | test_systemd_journal_argparse.py added |
|---|
comment:2 by , 7 years ago
| Milestone: | needs_triage → 31.0 |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:3 by , 7 years ago
| Status: | assigned → accepted |
|---|
Note:
See TracTickets
for help on using tickets.

Python Bindings: Add logging to 'systemd-journal'.
This patch adds the option to log to 'systemd-journal' from MythTV's Python Bindings. ('--systemd-journal'). If the python module 'systemd.journal' is not available, and '--systemd-journal' is selected, the user will be informed by an exception ('MythError').
Caution: Since the python package "python-systemd" may be not installed by default or is not available on the OS-platform (e.g.: Windows), this commit adds a 'weak' run-time dependency ("python-systemd")!
Additionally, it follows the generic conventions used by 'MythCommandLineParser':
Attached a patch against pull request 182 and a file showing its usage.
Please decide.