summaryrefslogtreecommitdiffstats
path: root/src/journal-remote
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-06 06:26:26 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-06 06:26:26 +0100
commit5dabb1e04e4521abf040e77a8322b70e7acdc7b0 (patch)
tree9146178f0bfe049a0819f398d84c7822dd4f75ae /src/journal-remote
parentpo: Initial Hungarian translation (diff)
downloadsystemd-5dabb1e04e4521abf040e77a8322b70e7acdc7b0.tar.xz
systemd-5dabb1e04e4521abf040e77a8322b70e7acdc7b0.zip
journal-upload: enable curl debug output conditionally
https://bugs.freedesktop.org/show_bug.cgi?id=86464
Diffstat (limited to 'src/journal-remote')
-rw-r--r--src/journal-remote/journal-upload.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index 5b25da56d3..50332edcc7 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -236,8 +236,9 @@ int start_upload(Uploader *u,
easy_setopt(curl, CURLOPT_HTTPHEADER, u->header,
LOG_ERR, return -EXFULL);
- /* enable verbose for easier tracing */
- easy_setopt(curl, CURLOPT_VERBOSE, 1L, LOG_WARNING, );
+ if (_unlikely_(log_get_max_level() >= LOG_DEBUG))
+ /* enable verbose for easier tracing */
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L, LOG_WARNING, );
easy_setopt(curl, CURLOPT_USERAGENT,
"systemd-journal-upload " PACKAGE_STRING,