summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-remote-parse.c
Commit message (Collapse)AuthorAge
* Remove src/journal-remoteAndy Wingo2015-04-19
|
* fix gcc warnings about uninitialized variablesHarald Hoyer2015-03-27
| | | | | | | | | | | | | like: src/shared/install.c: In function ‘unit_file_lookup_state’: src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized] return r < 0 ? r : state; ^ src/shared/install.c:1796:13: note: ‘r’ was declared here int r; ^
* journal-remote: explain why source->buf cannot be nullZbigniew Jędrzejewski-Szmek2015-03-13
| | | | In reference to CID #1238956.
* journal-remote: make process_data staticZbigniew Jędrzejewski-Szmek2015-03-13
|
* journal-remote: stop using EWOULDBLOCKDavid Herrmann2015-03-13
| | | | | There is no reason to ever use EWOULDBLOCK. It's equivalent to EAGAIN on all architectures on linux.
* journal-remote: process events without delayZbigniew Jędrzejewski-Szmek2015-03-13
| | | | | | | | | | | | | | | | | | 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
* journal-remote: downgrade routine messages to debugZbigniew Jędrzejewski-Szmek2015-03-13
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=89486
* journal-remote: fix saving of binary fieldsZbigniew Jędrzejewski-Szmek2015-03-02
| | | | | | | Binary fields were not processed properly, and resulting journal files were non-conforming, resulting in an error ("Invalid field.") when reading. https://bugs.freedesktop.org/show_bug.cgi?id=89391
* Assorted format fixesZbigniew Jędrzejewski-Szmek2015-01-22
| | | | | Types used for pids and uids in various interfaces are unpredictable. Too bad.
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-28
| | | | | | | | | | | If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
* treewide: more log_*_errno() conversions, multiline callsMichal Schmidt2014-11-28
| | | | | | | | | | | | Basically: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \ $f; done Plus manual indentation fixups.
* shared/log: add log_trace as compile-time optional debuggingZbigniew Jędrzejewski-Szmek2014-10-23
| | | | | | | | | 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.
* journal-remote: fix counting of events writtenZbigniew Jędrzejewski-Szmek2014-09-25
| | | | | | | | | | | 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.
* journal-remote: fix check if realloc failedThomas Hindoe Paaboel Andersen2014-08-31
|
* journal-remote: avoid copying input dataZbigniew Jędrzejewski-Szmek2014-07-15
| | | | | | Instead of copying fields into new memory allocations, simply keep pointers into the receive buffer. Data in this buffer is only copied when there is not enough space for new data and a large chunk of the buffer contains old data.
* journal-remote: rework fd and writer reference handlingZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal-remote: improve some messagesZbigniew Jędrzejewski-Szmek2014-07-15
|
* Fix problem with allocating large buffers and log leftoversZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal-remote: allow splitting incoming logs by source hostZbigniew Jędrzejewski-Szmek2014-07-15
| | | | | | | | | | 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.
* journal-remote: reject fields above maximum sizeZbigniew Jędrzejewski-Szmek2014-07-15
| | | | | | | Also fix an infinite loop on E2BIG. Remember what range we already scanned for '\n', to avoid quadratic behaviour on long "text" fields.
* Move network-related journal programs to src/journal-remote/Zbigniew Jędrzejewski-Szmek2014-07-15
Directory src/journal has become one of the largest directories, and since systemd-journal-gatewayd, systemd-journal-remote, and forthcoming systemd-journal-upload are all closely related, create a separate directory for them.