mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Migrate to Flogger (yellow)
This is a 'yellow' Flogger migration CL. Yellow CLs should be mostly safe but include changes that are notable for one reason or another. Manual intervention may be required to address small issues. The comments in this CL indicate cases where suggested code changes should be double checked, or even modified. There may even be cases where files outside this CL are affected by changes to things such as logger visibility. However if a change does not have an associated comment then it should be safe. For more information, see [] Base CL: 197826149 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=198097990
This commit is contained in:
parent
92190f8699
commit
4be4fb0082
21 changed files with 69 additions and 52 deletions
|
@ -17,6 +17,8 @@ java_library(
|
|||
"@com_google_appengine_tools_appengine_pipeline",
|
||||
"@com_google_code_findbugs_jsr305",
|
||||
"@com_google_dagger",
|
||||
"@com_google_flogger",
|
||||
"@com_google_flogger_system_backend",
|
||||
"@com_google_guava",
|
||||
"@javax_servlet_api",
|
||||
"@joda_time",
|
||||
|
|
|
@ -23,7 +23,6 @@ import com.google.appengine.tools.mapreduce.InputReader;
|
|||
import com.google.appengine.tools.mapreduce.ShardContext;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.annotation.Entity;
|
||||
import google.registry.model.EppResource;
|
||||
|
@ -42,8 +41,6 @@ class ChildEntityReader<R extends EppResource, I extends ImmutableObject> extend
|
|||
|
||||
private static final long serialVersionUID = 7481761146349663848L;
|
||||
|
||||
static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
|
||||
/** This reader uses an EppResourceEntityReader under the covers to iterate over EPP resources. */
|
||||
private final EppResourceEntityReader<? extends R> eppResourceEntityReader;
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import static google.registry.model.ofy.ObjectifyService.ofy;
|
|||
import com.google.appengine.api.datastore.Cursor;
|
||||
import com.google.appengine.api.datastore.QueryResultIterator;
|
||||
import com.google.appengine.tools.mapreduce.InputReader;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.cmd.Query;
|
||||
import google.registry.model.ofy.CommitLogBucket;
|
||||
|
@ -32,8 +31,6 @@ import org.joda.time.DateTime;
|
|||
class CommitLogManifestReader
|
||||
extends RetryingInputReader<Key<CommitLogManifest>, Key<CommitLogManifest>> {
|
||||
|
||||
static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
|
||||
/**
|
||||
* Memory estimation for this reader.
|
||||
*
|
||||
|
|
|
@ -21,7 +21,6 @@ import com.google.appengine.api.datastore.Cursor;
|
|||
import com.google.appengine.api.datastore.QueryResultIterator;
|
||||
import com.google.appengine.tools.mapreduce.InputReader;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.cmd.Query;
|
||||
import google.registry.model.EppResource;
|
||||
|
@ -32,8 +31,6 @@ import javax.annotation.Nullable;
|
|||
/** Base class for {@link InputReader} classes that map over {@link EppResourceIndex}. */
|
||||
abstract class EppResourceBaseReader<T> extends RetryingInputReader<EppResourceIndex, T> {
|
||||
|
||||
static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
|
||||
/** Number of bytes in 1MB of memory, used for memory estimates. */
|
||||
static final long ONE_MB = 1024 * 1024;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import static google.registry.model.ofy.ObjectifyService.ofy;
|
|||
|
||||
import com.google.appengine.tools.mapreduce.InputReader;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.EppResource;
|
||||
import google.registry.model.index.EppResourceIndex;
|
||||
|
@ -27,6 +28,8 @@ import java.util.NoSuchElementException;
|
|||
/** Reader that maps over {@link EppResourceIndex} and returns resources. */
|
||||
class EppResourceEntityReader<R extends EppResource> extends EppResourceBaseReader<R> {
|
||||
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
private static final long serialVersionUID = -8042933349899971801L;
|
||||
|
||||
/**
|
||||
|
@ -61,7 +64,7 @@ class EppResourceEntityReader<R extends EppResource> extends EppResourceBaseRead
|
|||
Key<? extends EppResource> key = nextQueryResult().getKey();
|
||||
EppResource resource = ofy().load().key(key).now();
|
||||
if (resource == null) {
|
||||
logger.severefmt("EppResourceIndex key %s points at a missing resource", key);
|
||||
logger.atSevere().log("EppResourceIndex key %s points at a missing resource", key);
|
||||
continue;
|
||||
}
|
||||
// Postfilter to distinguish polymorphic types (e.g. DomainBase and DomainResource).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue