From 5dabb1e04e4521abf040e77a8322b70e7acdc7b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Jan 2015 00:26:26 -0500 Subject: [PATCH] journal-upload: enable curl debug output conditionally https://bugs.freedesktop.org/show_bug.cgi?id=86464 --- src/journal-remote/journal-upload.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c index 5b25da56d..50332edcc 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, -- 2.30.2