diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-07-08 13:45:03 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-07-08 13:45:03 -0400 |
commit | 1ad7f56b9015ce31d2b5c6a4418fc8c52f48120a (patch) | |
tree | 0a992dd5449b3909cdf357d677433dd868a4d72b /docs/journal.rst | |
parent | 2cef4ef7fc8cf73e24c1a701cdd0203f63c7d57c (diff) | |
download | python-systemd-1ad7f56b9015ce31d2b5c6a4418fc8c52f48120a.tar.gz |
Move docs to top level and include in manifest
Diffstat (limited to 'docs/journal.rst')
-rw-r--r-- | docs/journal.rst | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/docs/journal.rst b/docs/journal.rst new file mode 100644 index 0000000..ea74cf8 --- /dev/null +++ b/docs/journal.rst @@ -0,0 +1,64 @@ +`systemd.journal` module +======================== + +.. automodule:: systemd.journal + :members: send, sendv, stream, stream_fd + :undoc-members: + +`JournalHandler` class +---------------------- + +.. autoclass:: JournalHandler + +Accessing the Journal +--------------------- + +.. autoclass:: _Reader + :undoc-members: + :inherited-members: + +.. autoclass:: Reader + :undoc-members: + :inherited-members: + + .. automethod:: __init__ + +.. autofunction:: _get_catalog +.. autofunction:: get_catalog + +.. autoclass:: Monotonic + +.. autoattribute:: systemd.journal.DEFAULT_CONVERTERS + +Example: polling for journal events +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This example shows that journal events can be waited for (using +e.g. `poll`). This makes it easy to integrate Reader in an external +event loop: + + >>> import select + >>> from systemd import journal + >>> j = journal.Reader() + >>> j.seek_tail() + >>> p = select.poll() + >>> p.register(j, j.get_events()) + >>> p.poll() + [(3, 1)] + >>> j.get_next() + + +Journal access types +~~~~~~~~~~~~~~~~~~~~ + +.. autoattribute:: systemd.journal.LOCAL_ONLY +.. autoattribute:: systemd.journal.RUNTIME_ONLY +.. autoattribute:: systemd.journal.SYSTEM +.. autoattribute:: systemd.journal.CURRENT_USER + +Journal event types +~~~~~~~~~~~~~~~~~~~ + +.. autoattribute:: systemd.journal.NOP +.. autoattribute:: systemd.journal.APPEND +.. autoattribute:: systemd.journal.INVALIDATE |