From 65199ed0b82d0cdee4aab529a9588e3507f46a92 Mon Sep 17 00:00:00 2001 From: Sergiu Deitsch Date: Thu, 18 Nov 2021 00:01:33 +0100 Subject: [PATCH] protect VLOG by use_logging --- src/logging.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/logging.cc b/src/logging.cc index 08999de1a..8db32cb6a 100644 --- a/src/logging.cc +++ b/src/logging.cc @@ -2167,7 +2167,9 @@ static bool SendEmailInternal(const char*dest, const char *subject, string cmd = logmailer + " -s" + ShellEscape(subject) + " " + ShellEscape(dest); - VLOG(4) << "Mailing command: " << cmd; + if (use_logging) { + VLOG(4) << "Mailing command: " << cmd; + } FILE* pipe = popen(cmd.c_str(), "w"); if (pipe != NULL) {