mirror of
https://github.com/google/nomulus
synced 2026-01-11 08:20:27 +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:
@@ -23,7 +23,7 @@ import com.google.api.services.bigquery.model.TableReference;
|
||||
import com.google.api.services.bigquery.model.ViewDefinition;
|
||||
import com.google.appengine.api.taskqueue.TaskOptions;
|
||||
import com.google.appengine.api.taskqueue.TaskOptions.Method;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import google.registry.bigquery.BigqueryFactory;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.request.Action;
|
||||
@@ -52,7 +52,7 @@ public class UpdateSnapshotViewAction implements Runnable {
|
||||
|
||||
static final String PATH = "/_dr/task/updateSnapshotView"; // See web.xml.
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
@Inject
|
||||
@Parameter(UPDATE_SNAPSHOT_DATASET_ID_PARAM)
|
||||
@@ -101,8 +101,8 @@ public class UpdateSnapshotViewAction implements Runnable {
|
||||
datasetId, tableId, kindName, STANDARD_LATEST_SNAPSHOT_DATASET, standardTemplate, false);
|
||||
|
||||
} catch (Throwable e) {
|
||||
logger.severefmt(e, "Could not update snapshot view for table %s", tableId);
|
||||
throw new InternalServerErrorException("Error in update snapshot view action");
|
||||
throw new InternalServerErrorException(
|
||||
String.format("Could not update snapshot view for table %s", tableId), e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class UpdateSnapshotViewAction implements Runnable {
|
||||
.put("SOURCE_TABLE", sourceTableId)
|
||||
.build())));
|
||||
|
||||
logger.infofmt(
|
||||
logger.atInfo().log(
|
||||
"Updated view [%s:%s.%s] to point at snapshot table [%s:%s.%s].",
|
||||
projectId, viewDataset, kindName, projectId, sourceDatasetId, sourceTableId);
|
||||
}
|
||||
@@ -150,8 +150,8 @@ public class UpdateSnapshotViewAction implements Runnable {
|
||||
if (e.getDetails().getCode() == 404) {
|
||||
bigquery.tables().insert(ref.getProjectId(), ref.getDatasetId(), table).execute();
|
||||
} else {
|
||||
logger.warningfmt(
|
||||
e, "UpdateSnapshotViewAction failed, caught exception %s", e.getDetails());
|
||||
logger.atWarning().withCause(e).log(
|
||||
"UpdateSnapshotViewAction failed, caught exception %s", e.getDetails());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user