| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| | |
Later on a proper wrapper in daemon.py should be added.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
In _reader we were raising OSError(errno=ENOSYS), but in _dameon
we were raising NotImplementedError. Let's always use ENOSYS.
Also, make the messages in _reader more specific.
Fixes #33.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
When running in a chroot, doctests that called journal.stream would
fail with ENOENT. Move the tests to test_journal, where we can skip
tests properly (without uglyfying the documentation).
Fixes #32.
|
| | |
| |
| | |
py3 doesn't have dict.iteritems() anymore.
|
| | |
| |
| |
| |
| | |
This bind() call may fail if TMPDIR is too long.
Bug: https://bugs.gentoo.org/610368
|
| |/
|
| |
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
|
| |
|
|
| |
This approach allows to use LoggerAdapter+extra or .info(.., extra={})
to transparently add extra fields to journal.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
It's fairly easy to provide a reasonable default for the first argument.
Let's do that.
Also, the documentation was misleading, suggesting that the function itself
can be passed as file parameter to print(). Use a different name for the
temporary variable to clarify that.
|
| |
|
|
|
| |
By default debug messages are ignored, and INFO should be used for
"normal" messages.
|
| | |
|
| | |
|
| |
|
|
| |
build/lib.linux-x86_64-3.5/systemd/journal.py:docstring of systemd.journal.stream:15: WARNING: Literal block expected; none found.
|
| |
|
|
| |
Should fix #12.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of generating the list of message ids anew during every build,
the file is generated manually and committed into the
repository. Also, the list of defines is stored in id128-defines.h,
also kept in the repository. Both files should only grow.
This should make build easier. But it also fixes a problem with
systemd, which occasionally drops message definitions. We will keep
them forever, so it should be safe to rely on the presence of message
definitions which systemd does not use anymore.
Fixes #23.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This somewhat breaks backwards compatibility, but not for the
previously documented arguments: floats are now interpreted
differently, but ints and datetime.datetime objects are interpreted
the same as before. But the documentation clearly stated that only
ints and datetime.datetime objects were allowed.
This makes seek_realtime match seek_monotonic and other functions
which take time and follows the principle of least surprise.
Fixes #21.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's pass any flags through to the journal functions without checking
validity. Those functions do their own checking, so there's no need to
second-guess.
The semantics for _Reader(flags=0) are a bit changed:
before, this would be transformed into sd_journal_open(SD_J_LOCAL_ONLY).
Now, this results in sd_journal_open(0). Previous behaviour should be
achieved by not specifying the flags at all.
This change is necessary, because previously it was not possible to
pass flags=0 to sd_journal_open(0), i.e. it was not possible to "merge"
journals through the Python interface.
Similarly, Reader(flags=0) now means to open all journals, and
Reader(flags=None) is the same as Reader(flags=LOCAL_ONLY).
|
| | |
|
| |
|
|
|
| |
Those are field names and they should always be ASCII, and converting
them to str automatically makes the answer more useful.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Wrapping the sources to ~80 columns means that the formatted output is
annoying to read. Rewrap to ~74 columns in the output.
Also remove some obsolete descritions of journal permissions and refer
to journalctl(1) instead.
Add some missing docstrings.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
The socket module seems to be missing this in python2.7.
|
| | |
|
| |
|
|
|
|
|
| |
gcc warns that r might be uninitialized, because it doesn't
know that r will be initialized in the 'if' statement.
Initialize the variable to avoid the warning.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Closes #8.
|
| |\ |
|
| | |
| |
| |
| | |
The fix was committed in v226-362-g0260d1d542.
|
| | |
| |
| |
| |
| | |
While we *usually* get those messages from udev, in many tests environments
this will not be true, so just do not try to check the output at all.
|
| | |
| |
| |
| |
| |
| |
| | |
It would be nice to run those tests against fake journal files
with the right content to actually test the matches. But those
tests are still useful because they test that the interface
works as expected.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Unfortunately the "standard" way to access the names in the
defined module does not work. I find it nicer to explicitly import,
e.g. from systemd import journal, because then the examples
correspond more closely to what a user would use. The only
exception is made for JournalHandler, because journal.JournalHandler
is a tad to long.
|