@@ -11,29 +11,29 @@ Installation
1111On Fedora 17+:
1212
1313 sudo yum install git python-pip gcc python-devel systemd-devel
14- pip-python install git+http://github.com/davidstrauss/journald- python.git#egg=journald
14+ pip-python install git+http://github.com/systemd/ python-systemd .git#egg=systemd
1515
1616Usage
1717=====
1818
1919Quick example:
2020
21- import journald
22- journald .send('Hello world')
23- journald .send('Hello, again, world', FIELD2='Greetings!', FIELD3='Guten tag')
24- journald .send('Binary message', BINARY=b'\xde\xad\xbe\xef')
21+ from systemd import journal
22+ journal .send('Hello world')
23+ journal .send('Hello, again, world', FIELD2='Greetings!', FIELD3='Guten tag')
24+ journal .send('Binary message', BINARY=b'\xde\xad\xbe\xef')
2525
2626There is one required argument -- the message, and additional fields
2727can be specified as keyword arguments. Following the journald API, all
2828names are uppercase.
2929
3030The journald sendv call can also be accessed directly:
3131
32- import journald
33- journald .sendv('MESSAGE=Hello world')
34- journald .sendv('MESSAGE=Hello, again, world', 'FIELD2=Greetings!',
32+ from systemd import journal
33+ journal .sendv('MESSAGE=Hello world')
34+ journal .sendv('MESSAGE=Hello, again, world', 'FIELD2=Greetings!',
3535 'FIELD3=Guten tag')
36- journald .sendv('MESSAGE=Binary message', b'BINARY=\xde\xad\xbe\xef')
36+ journal .sendv('MESSAGE=Binary message', b'BINARY=\xde\xad\xbe\xef')
3737
3838The two examples should give the same results in the log.
3939
@@ -62,5 +62,5 @@ Test Builds (for Development)
6262 python setup.py build
6363 cd builds/lib.*
6464 python
65- >>> import journald
66- >>> journald .send("Test")
65+ >>> from systemd import journal
66+ >>> journal .send("Test")
0 commit comments