diff options
author | Alexander Olekhnovich <alex@aiven.io> | 2020-08-20 10:00:30 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-11-12 19:10:13 +0100 |
commit | 9cbc4e93b40b452296be6daf0f61a2533630a007 (patch) | |
tree | 25636fef5cd8c0d891ffd9a63ac37d08dab76258 /systemd/journal.py | |
parent | 5dd8afda3ec83d245a4708638a40ca267d0dfed0 (diff) | |
download | python-systemd-9cbc4e93b40b452296be6daf0f61a2533630a007.tar.gz |
journal: add namespace support
Add log namespace support which is added since systemd v245
Diffstat (limited to 'systemd/journal.py')
-rw-r--r-- | systemd/journal.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/systemd/journal.py b/systemd/journal.py index 64502ce..c6b3a01 100644 --- a/systemd/journal.py +++ b/systemd/journal.py @@ -140,7 +140,7 @@ class Reader(_Reader): journal. """ - def __init__(self, flags=None, path=None, files=None, converters=None): + def __init__(self, flags=None, path=None, files=None, converters=None, namespace=None): """Create a new Reader. Argument `flags` defines the open flags of the journal, which can be one @@ -149,8 +149,8 @@ class Reader(_Reader): and SYSTEM_ONLY opens only journal files of system services and the kernel. Argument `path` is the directory of journal files, either a file system - path or a file descriptor. Note that `flags`, `path`, and `files` are - exclusive. + path or a file descriptor. Specify `namespace` to read from specific journal + namespace. Note that `flags`, `path`, `files` and `namespace` are exclusive. Argument `converters` is a dictionary which updates the DEFAULT_CONVERTERS to convert journal field values. Field names are used @@ -171,7 +171,7 @@ class Reader(_Reader): else: flags = 0 - super(Reader, self).__init__(flags, path, files) + super(Reader, self).__init__(flags, path, files, namespace) if _sys.version_info >= (3, 3): self.converters = _ChainMap() if converters is not None: |