043945b93824e33e040954612aaa934cd1a43a1b |
|
13-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: process events without delay
journal-remote buffers input, and then parses it handling one journal entry at a time.
It was possible for useful data to be left in the buffer after some entries were
processesed. But all data would be already read from the fd, so there would be
no reason for the event loop to call the handler again. After some new data came in,
the handler would be called again, and would then process the "old" data in the buffer.
Fix this by enabling a handler wherever we process input data and do not exhaust data
from the input buffer (i.e. when EAGAIN was not encountered). The handler runs until
we encounter EAGAIN.
Looping over the input data is done in this roundabout way to allow the event loop
to dispatch other events in the meanwhile. If the loop was inside the handler, a
source which produced data fast enough could completely monopolize the process.
https://bugs.freedesktop.org/show_bug.cgi?id=89516 |
cb41ff2922b8a555c01d52e1038ac26360253c15 |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
shared/log: add log_trace as compile-time optional debugging
Repetetive messages can be annoying when running with
SYSTEMD_LOG_LEVEL=debug, but they are sometimes very useful
when debugging problems. Add log_trace which is like log_debug
but becomes a noop unless LOG_TRACE is defined during compilation.
This makes it easy to enable very verbose logging for a subset
of programs when compiling from source. |
dd87b1840c966fd25b81a7aa1071e8488c624db8 |
|
26-Sep-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: fix counting of events written
After recent changes the number was always reported as 0, because
the accounting was done server_destroy(), called after the message was
already printed. But even before this change, the counts were wrong
because seqnum start at 0 only for newly created journal files, so when
appending to existing files, the calculated count was wrong anyway.
Also do some variable renaming for consistency and disable some low-level
debug messages. |
8201af08fa09c2bd0f005fbe262f27e2c5bd2d86 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: allow splitting incoming logs by source host
Previously existing scheme where the file name would be based on
the source was just too ugly and unpredicatable. Now there are
only two options:
1. just one file (until rotation),
2. one file per source host, using the hostname as filename part.
For the cases where the source is specified by the user, only
option one is allowed, and the full of the file must be specified. |