mirror of
https://github.com/google/nomulus
synced 2026-04-27 11:35:20 +00:00
Migrate to Flogger (green)
This is a 'green' Flogger migration CL. Green CLs are intended to be as safe as possible and should be easy to review and submit. No changes should be necessary to the code itself prior to submission, but small changes to BUILD files may be required. Changes within files are completely independent of each other, so this CL can be safely split up for review using tools such as Rosie. For more information, see [] Base CL: 197826149 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=198560170
This commit is contained in:
@@ -20,7 +20,6 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import com.google.appengine.tools.cloudstorage.GcsFilename;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.io.CharStreams;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.gcs.GcsUtils;
|
||||
import google.registry.reporting.billing.BillingModule.InvoiceDirectoryPrefix;
|
||||
@@ -75,8 +74,6 @@ class BillingEmailUtils {
|
||||
this.retrier = retrier;
|
||||
}
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
|
||||
/** Sends an e-mail to all expected recipients with an attached overall invoice from GCS. */
|
||||
void emailOverallInvoice() {
|
||||
try {
|
||||
@@ -114,13 +111,12 @@ class BillingEmailUtils {
|
||||
IOException.class,
|
||||
MessagingException.class);
|
||||
} catch (Throwable e) {
|
||||
logger.severe(e, "Emailing invoice failed");
|
||||
// Strip one layer, because callWithRetry wraps in a RuntimeException
|
||||
sendAlertEmail(
|
||||
String.format(
|
||||
"Emailing invoice failed due to %s",
|
||||
getRootCause(e).getMessage()));
|
||||
throw e;
|
||||
throw new RuntimeException("Emailing invoice failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,8 +135,7 @@ class BillingEmailUtils {
|
||||
},
|
||||
MessagingException.class);
|
||||
} catch (Throwable e) {
|
||||
logger.severe(e, "The alert e-mail system failed.");
|
||||
throw e;
|
||||
throw new RuntimeException("The alert e-mail system failed.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user