From cb41ff2922b8a555c01d52e1038ac26360253c15 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 22 Oct 2014 23:27:57 -0500 Subject: shared/log: add log_trace as compile-time optional debugging 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. --- src/journal-remote/journal-remote.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/journal-remote/journal-remote.c') diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index 8a72c6eb2b..dc7120bbd5 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -505,11 +505,11 @@ static int process_http_upload( assert(source); - log_debug("request_handler_upload: connection %p, %zu bytes", - connection, *upload_data_size); + log_trace("%s: connection %p, %zu bytes", + __func__, connection, *upload_data_size); if (*upload_data_size) { - log_debug("Received %zu bytes", *upload_data_size); + log_trace("Received %zu bytes", *upload_data_size); r = push_data(source, upload_data, *upload_data_size); if (r < 0) @@ -572,7 +572,7 @@ static int request_handler( assert(url); assert(method); - log_debug("Handling a connection %s %s %s", method, url, version); + log_trace("Handling a connection %s %s %s", method, url, version); if (*connection_cls) return process_http_upload(connection, -- cgit v1.2.3-54-g00ecf