summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-remote-write.c
AgeCommit message (Collapse)Author
2014-11-28treewide: more log_*_errno() conversions, multiline callsMichal Schmidt
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.
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
2014-09-25journal-remote: fix counting of events writtenZbigniew Jędrzejewski-Szmek
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.
2014-07-16journal-remote: fix double typedef and add missing headerZbigniew Jędrzejewski-Szmek
2014-07-15journal-remote: avoid copying input dataZbigniew Jędrzejewski-Szmek
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.
2014-07-15journal-remote: rework fd and writer reference handlingZbigniew Jędrzejewski-Szmek
2014-07-15journal-remote: improve some messagesZbigniew Jędrzejewski-Szmek
2014-07-15journal-upload: use journal as the sourceZbigniew Jędrzejewski-Szmek
2014-07-15Move network-related journal programs to src/journal-remote/Zbigniew Jędrzejewski-Szmek
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.