diff options
author | David Strauss <david@davidstrauss.net> | 2012-09-06 16:48:51 -0700 |
---|---|---|
committer | David Strauss <david@davidstrauss.net> | 2012-09-06 16:48:51 -0700 |
commit | 7050e537b27400d2bff36721de5bea400a05ba93 (patch) | |
tree | b5d2be52e6178fb93e0f4522c7deacb88b3d5a88 /README.md | |
parent | 7ba24b5802998873df59bdb83b870897567be38e (diff) | |
download | python-systemd-7050e537b27400d2bff36721de5bea400a05ba93.tar.gz |
Doc updates
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") |