summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-upload.c
Commit message (Collapse)AuthorAge
* Assorted format fixesZbigniew Jędrzejewski-Szmek2015-01-22
| | | | | Types used for pids and uids in various interfaces are unpredictable. Too bad.
* journal-upload: enable curl debug output conditionallyZbigniew Jędrzejewski-Szmek2015-01-06
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=86464
* journal: install sigbus handler for journal tools tooLennart Poettering2015-01-05
| | | | | | | | | | | | | This makes them robust regarding truncation. Ideally, we'd export this as an API, but given how messy SIGBUS handling is, and the uncertain ownership logic of signal handlers we should not do this (unless libc one day invents a scheme how to sanely install SIGBUS handlers for specific memory areas only). However, for now we can still make all our own tools robust. Note that external tools will only have read-access to the journal anyway, where SIGBUS is much more unlikely, given that only writes are subject to disk full problems.
* journald-remote,journal-upload: Support .d directories in the usual search pathsJosh Triplett2014-11-29
|
* treewide: another round of simplificationsMichal Schmidt2014-11-28
| | | | | Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".
* 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: simplify log_*_errno(r,...) immediately followed by "return r"Michal Schmidt2014-11-28
|
* 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.
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-28
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-28
| | | | | | | | | | | | | 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().
* journal-upload: return proper exit codeZbigniew Jędrzejewski-Szmek2014-10-23
| | | | | Even when termninated normally, systemd-journal-upload would return something positive which would be interpreted as failure.
* journal-upload: fix --trust=all optionZbigniew Jędrzejewski-Szmek2014-10-23
|
* journal-upload: avoid calling printf with maximum precisionZbigniew Jędrzejewski-Szmek2014-10-23
| | | | | | Precision of INT_MAX does not work as I expected it to. https://bugzilla.redhat.com/show_bug.cgi?id=1154334
* journal-upload: verify state file can be saved before uploadingZbigniew Jędrzejewski-Szmek2014-10-23
| | | | | Do our best verify that we can actually write the state file before upload commences to avoid duplicate messages on the server.
* journal-upload: do not require port to be setZbigniew Jędrzejewski-Szmek2014-10-23
|
* systemd-upload: print paths in help()Zbigniew Jędrzejewski-Szmek2014-10-23
|
* journal-upload: fix socket activationZbigniew Jędrzejewski-Szmek2014-10-23
|
* journal-upload: Remove compilation warningPhilippe De Swert2014-09-18
| | | | | | | | | When compiling we see this curl warning popping up: src/journal-remote/journal-upload.c:194:17: warning: call to ‘_curl_easy_setopt_err_error_buffer’ declared with attribute warning: curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option [enabled by default] This patch removes the warning (which occurs twice).
* notify: send STOPPING=1 from our daemonsLennart Poettering2014-08-21
|
* journal-upload: make sure that 'r' is initializedLukas Nykryn2014-08-20
|
* journal-upload: allow the tool to startLennart Poettering2014-08-20
|
* cmdline: for new tools avoid introduce new negative switches, and properly ↵Lennart Poettering2014-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | align --help texts Negative switches are a bad un-normalized thing. We alerady have some, but we should try harder to avoid intrdoucing new ones. Hence, instead of adding two switches: --foobar --no-foobar Let's instead use the syntax --foobar --foobar=yes --foobar=no Where the first two are equivalent. The boolean argument is parsed following the usual rules. Change all new negative switches this way. This patch also properly aligns the --help table, so that single char switches always get a column separate of the long switches.
* journal-remote: rename KEY_FILE to avoid confict with <linux/input.h>Zbigniew Jędrzejewski-Szmek2014-08-03
|
* Let config_parse open file where applicableZbigniew Jędrzejewski-Szmek2014-07-16
| | | | | | | | Special care is needed so that we get an error message if the file failed to parse, but not when it is missing. To avoid duplicating the same error check in every caller, add an additional 'warn' boolean to tell config_parse whether a message should be issued. This makes things both shorter and more robust wrt. to error reporting.
* journal-upload: add config fileZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal-remote: let user specify just the main part of the urlZbigniew Jędrzejewski-Szmek2014-07-15
| | | | We can append /upload ourselves.
* journal-remote: improve some messagesZbigniew 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-upload: add watchdog supportZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal-upload: make state persistentZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal-upload: use journal as the sourceZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal-upload: HTTPS supportZbigniew Jędrzejewski-Szmek2014-07-15
|
* journal-upload: a tool to push messages to systemd-journal-remoteZbigniew Jędrzejewski-Szmek2014-07-15