| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Build instructions:
make
make DESTIDIR=/tmp/... install
make DESTIDIR=/tmp/... sphinx-html sphinx-man sphinx-epub ...
|
| | | |
|
| | |
| |
| |
| | |
uuid.UUIDs are utilized to hold UUID values.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 ]
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
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.
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
sd_journal_stream_fd() wrapper
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ \
| |/
| | |
Python 3 and UTF-8
|
| | | |
|
| | |
| |
| |
| | |
This is an implementation detail only.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
$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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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().
|
| | |
| |
| |
| |
| | |
Should work with Python 3.0 - 3.2. Compatibility with Python 3.3 might
require additional changes.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|