diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -11,17 +11,17 @@ Installation On Fedora 17+: sudo yum install git python-pip gcc python-devel systemd-devel - pip-python install git+http://github.com/davidstrauss/journald-python.git#egg=journald + pip-python install git+http://github.com/systemd/python-systemd.git#egg=systemd Usage ===== Quick example: - import journald - journald.send('Hello world') - journald.send('Hello, again, world', FIELD2='Greetings!', FIELD3='Guten tag') - journald.send('Binary message', BINARY=b'\xde\xad\xbe\xef') + from systemd import journal + journal.send('Hello world') + journal.send('Hello, again, world', FIELD2='Greetings!', FIELD3='Guten tag') + journal.send('Binary message', BINARY=b'\xde\xad\xbe\xef') There is one required argument -- the message, and additional fields can be specified as keyword arguments. Following the journald API, all @@ -29,11 +29,11 @@ names are uppercase. The journald sendv call can also be accessed directly: - import journald - journald.sendv('MESSAGE=Hello world') - journald.sendv('MESSAGE=Hello, again, world', 'FIELD2=Greetings!', + from systemd import journal + journal.sendv('MESSAGE=Hello world') + journal.sendv('MESSAGE=Hello, again, world', 'FIELD2=Greetings!', 'FIELD3=Guten tag') - journald.sendv('MESSAGE=Binary message', b'BINARY=\xde\xad\xbe\xef') + journal.sendv('MESSAGE=Binary message', b'BINARY=\xde\xad\xbe\xef') The two examples should give the same results in the log. @@ -62,5 +62,5 @@ Test Builds (for Development) python setup.py build cd builds/lib.* python - >>> import journald - >>> journald.send("Test") + >>> from systemd import journal + >>> journal.send("Test") |