Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ GLOG_DEFINE_int32(logemaillevel, 999,
"Email log messages logged at this level or higher"
" (0 means email all; 3 means email FATAL only;"
" ...)");
GLOG_DEFINE_string(logmailer, "/bin/mail",
GLOG_DEFINE_string(logmailer, "",
"Mailer used to send logging email");

// Compute the default value for --log_dir
Expand Down Expand Up @@ -2028,8 +2028,12 @@ static bool SendEmailInternal(const char*dest, const char *subject,
subject, body, dest);
}

string logmailer = FLAGS_logmailer;
if (logmailer.empty()) {
logmailer = "/bin/mail";
}
string cmd =
FLAGS_logmailer + " -s" +
logmailer + " -s" +
ShellEscape(subject) + " " + ShellEscape(dest);
VLOG(4) << "Mailing command: " << cmd;

Expand Down