Commit 7a4d372b authored by Leigh B Stoller's avatar Leigh B Stoller

Completely silence a few things. Too much email.

parent 30892a11
......@@ -103,6 +103,7 @@ my $debug = 0;
my $mailerrors = 1;
my $mailsendlog= 0;
my $nostorelogs= 0;
my $noanything = 0;
# Flag for XMLERROR.
my $logging = 0;
my $logforked = 0;
......@@ -533,6 +534,12 @@ if ($method eq "CreateSliver" ||
$debug = 2;
$nostorelogs = 0;
}
if ($method eq "PostHistoryRecord" ||
$method eq "Register") {
$debug = 0;
$nostorelogs = 1;
$noanything = 1;
}
#
# Look for a cert chain and verify the URN namespace along the chain.
......@@ -735,7 +742,7 @@ LogAbort();
# If nothing in the log and no error, then we just store the metadata
# and skip the message.
#
if (-s $logfile->filename() || $iserror) {
if ((-s $logfile->filename() || $iserror) && !$noanything) {
my $to = ($rpcerror ? $TBOPS : ($MAINSITE ? $PGERRORS : $TBLOGS));
my $cc = ($MAINSITE ? undef : "CC: $PGERRORS");
SENDMAIL($to, "protogeni-wrapper.pl", $message,
......@@ -751,7 +758,7 @@ if (-s $logfile->filename() || $iserror) {
if (!$logforked) {
# Use eval to avoid messing up the output stream if any errors.
# If nostorelogs is set, we do not bother to store, just delete.
eval { ($nostorelogs && !$iserror ?
eval { ($nostorelogs && (!$iserror || $noanything) ?
$logfile->Delete(1) : $logfile->Store()); };
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment