[mythtv-commits] Ticket #13487: python bindings do not support the systemd-journal logging option (--systemd-journal)

MythTV noreply at mythtv.org
Sun Oct 13 17:06:15 UTC 2019


#13487: python bindings do not support the systemd-journal logging option
(--systemd-journal)
----------------------------------+--------------------------------
 Reporter:  Gary Buhrmaster       |          Owner:  Raymond Wagner
     Type:  Bug Report - General  |         Status:  new
 Priority:  minor                 |      Milestone:  needs_triage
Component:  Bindings - Python     |        Version:  Master Head
 Severity:  medium                |     Resolution:
 Keywords:                        |  Ticket locked:  0
----------------------------------+--------------------------------

Comment (by rcrdnalor):

 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':

  - Logging to database is deactivated by default
    and can be activated by '--enable-dblog'.
    The command line option '--nodblog' is kept for legacy
    reasons.

  - Logging to 'logfile', 'logpath', 'syslog', 'systemd-journal'
    is mutually exclusive: The user will be informed if he tries
    to combine those options. Previously, the bindings used
    the last option and deactivate the others, without user
    notification.


 Attached a patch against pull request 182 and a file showing its usage.

 Please decide.

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13487#comment:1>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list