summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * systemd-python: moved PyRun_String to journal.py codeSteven Hiscocks2015-07-052-53/+50
| |
| * systemd-python: add Journal class for reading journalSteven Hiscocks2015-07-052-0/+1165
| |
| * python: build html docs using sphinxZbigniew Jędrzejewski-Szmek2015-07-056-15/+344
| | | | | | | | | | | | | | Build instructions: make make DESTIDIR=/tmp/... install make DESTIDIR=/tmp/... sphinx-html sphinx-man sphinx-epub ...
| * python: utilize uuid.UUID in loggingZbigniew Jędrzejewski-Szmek2015-07-051-13/+14
| |
| * python: add systemd.id128 moduleZbigniew Jędrzejewski-Szmek2015-07-054-4/+164
| | | | | | | | uuid.UUIDs are utilized to hold UUID values.
| * python: add journal backend for the logging frameworkMarti Raudsepp2015-07-051-0/+85
| | | | | | | | | | | | | | | | | | | | Supports Python versions 2.6 through 3.3 (tested on 2.7 and 3.2). See JournalHandler docstring for usage details. [zj: - use send() instead of using sendv() directly - do exception handling like in the logging module - bumped min version to python2.6, since the module does not work with python2.5 anyway ]
| * systemd-python: fix nesting of #ifs and #pragmasZbigniew Jędrzejewski-Szmek2015-07-051-2/+2
| |
| * python: make gcc shut upLennart Poettering2015-07-051-0/+5
| |
| * python: fix error handling, and allocate argument array on the stackLennart Poettering2015-07-051-28/+12
| |
| * python: reindent to follow coding styleLennart Poettering2015-07-052-155/+153
| |
| * python: change license to LGPL 2.1Lennart Poettering2015-07-053-0/+58
| | | | | | | | | | | | The original license has been MIT for this code, but David Strauss (its original author) agreed to relicense it to LGPL 2.1 for inclusion in systemd.
| * python: integrate David Strauss' python-systemd packageLennart Poettering2015-07-051-0/+3
|/
* Add Python 3 instructions.David Strauss2012-09-061-7/+12
|
* Fix for Python 3.David Strauss2012-09-061-1/+1
|
* Doc updatesDavid Strauss2012-09-061-11/+11
|
* Make installable.David Strauss2012-09-064-29/+29
|
* Merge pull request #3 from keszybz/streamDavid Strauss2012-09-032-1/+63
|\ | | | | sd_journal_stream_fd() wrapper
| * Add a wrapper for sd_journal_stream_fd(3)Zbigniew Jędrzejewski-Szmek2012-07-132-1/+63
| | | | | | | | | | | | | | A bare-bones wrapper is provided as _journald.stream_fd(), and a more usable version as journald.stream(). Documentation is included. Tested under Python 2.7 and 3.2.
* | Merge pull request #2 from keszybz/masterDavid Strauss2012-09-037-64/+208
|\ \ | |/ | | Python 3 and UTF-8
| * Fix docstringsZbigniew Jędrzejewski-Szmek2012-07-132-3/+7
| |
| * Do not export tracebackZbigniew Jędrzejewski-Szmek2012-07-131-2/+3
| | | | | | | | This is an implementation detail only.
| * Allow UTF-8 in message payloadZbyszek Jędrzejewski-Szmek2012-07-123-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow UTF-8, and force encoding as UTF-8 if the payload is known to be text. Under Python 3, this means that bytes payload is sent as-is, and strings are encoded to UTF-8. Under Python 2, this means that unicode payload is encoded to UTF-8, and the rest is sent as-is, because there we are missing the extra information to distinguish text and binary data. IOW, under Python 2, it is the responsibility of the called to provide properly encoded payload, and under Python 3, there is extra hand-holding which should help catch mistakes. Fields which are certain to be text (MESSAGE, MESSAGE_ID, CODE_FILE, CODE_FUNC) are text-only. The names of fields are text-only too. The payload of other fields can be binary.
| * Use traceback module to specify CODE_{LINE,FUNC,FILE}Zbigniew Jędrzejewski-Szmek2012-07-122-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $python3 -c 'import journald; x = lambda: journald.send("tescik"); x()' gives a message like: MESSAGE=tescik CODE_FILE=<string> CODE_LINE=1 CODE_FUNC=<lambda> _TRANSPORT=journal ... This makes the CODE_* fields much more useful: before they would always give the location of the sd_journald_sendv() call in the module source, and now they specify the location of the caller of journald.send(). When using the low-level journald.sendv() is becomes the responsibility of the caller to specify the CODE_* fields.
| * Add frontend module in pure-Python and hide old moduleZbigniew Jędrzejewski-Szmek2012-07-125-17/+60
| | | | | | | | | | | | | | | | | | | | | | journald.send() is renamed to journald.sendv(), and a replacement journald.send() is added. This new function has a more pythonic API, where one positional argument is used for the message, and keyword arguments can be used to specify other fields. Implementing argument parsing in C would be really painful, for little gain, so a pure-python module is added, which provides send(), which in turn calls sendv().
| * Compatibility with Python 3Zbigniew Jędrzejewski-Szmek2012-07-122-5/+48
| | | | | | | | | | Should work with Python 3.0 - 3.2. Compatibility with Python 3.3 might require additional changes.
| * Rework error handling in preparation for py3k changesZbigniew Jędrzejewski-Szmek2012-07-101-10/+14
| | | | | | | | | | | | When the #ifdefs neccesary to support Python 2 and 3 are added, there will be many more paths through the code. This style of error handling makes the code easier to read.
| * Ignore result of build_ext -iZbigniew Jędrzejewski-Szmek2012-07-101-0/+1
| |
| * Check the return value from sd_journal_sendvZbigniew Jędrzejewski-Szmek2012-07-102-3/+17
| |
| * Use PyString_AsStringAndSize to avoid strlenZbigniew Jędrzejewski-Szmek2012-07-101-4/+5
| | | | | | | | | | | | | | | | This should make the operation microscopically faster. A second difference is that strings with embedded NULLs will now be allowed, although I'm not really sure what is the impact of that change.
| * Wrap README to 80 linesZbyszek Jędrzejewski-Szmek2012-07-101-6/+13
| |
| * Add emacs config for indentationZbigniew Jędrzejewski-Szmek2012-07-101-0/+7
|/
* Proper TypeError exception handling.David Strauss2012-06-261-0/+6
|
* Whitespace fixes. Drop header-style guards.David Strauss2012-06-261-8/+3
|
* Documentation updates.David Strauss2012-06-261-4/+28
|
* Code clean-up.David Strauss2012-06-261-11/+7
|
* Allow varags.David Strauss2012-06-261-3/+24
|
* Use sd_journal_print() instead of send.David Strauss2012-06-251-1/+1
|
* Now works with import.David Strauss2012-06-251-1/+1
|
* Add systemd-journal library.David Strauss2012-06-251-1/+4
|
* Add test build instructions.David Strauss2012-06-251-3/+12
|
* Initial boilerplate work. Compiles without warnings. Untested.David Strauss2012-06-253-1/+52
|
* Add MIT license.David Strauss2012-06-251-0/+20
|
* Initial commitDavid Strauss2012-06-252-0/+31