mirror of
https://github.com/google/nomulus
synced 2026-09-05 23:57:01 +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:
@@ -33,7 +33,7 @@ import com.google.appengine.tools.pipeline.impl.servlets.PipelineServlet;
|
||||
import com.google.appengine.tools.pipeline.impl.servlets.TaskHandler;
|
||||
import com.google.apphosting.api.ApiProxy;
|
||||
import com.google.common.base.CharMatcher;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.testing.AppEngineRule;
|
||||
import google.registry.testing.FakeClock;
|
||||
@@ -64,7 +64,7 @@ import org.junit.Rule;
|
||||
*/
|
||||
public abstract class MapreduceTestCase<T> extends ShardableTestCase {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
protected T action;
|
||||
|
||||
@@ -97,8 +97,8 @@ public abstract class MapreduceTestCase<T> extends ShardableTestCase {
|
||||
|
||||
protected void executeTask(String queueName, QueueStateInfo.TaskStateInfo taskStateInfo)
|
||||
throws Exception {
|
||||
logger.finefmt("Executing task %s with URL %s",
|
||||
taskStateInfo.getTaskName(), taskStateInfo.getUrl());
|
||||
logger.atFine().log(
|
||||
"Executing task %s with URL %s", taskStateInfo.getTaskName(), taskStateInfo.getUrl());
|
||||
// Hack to allow for deferred tasks. Exploits knowing how they work.
|
||||
if (taskStateInfo.getUrl().endsWith("__deferred__")) {
|
||||
ObjectInputStream oin =
|
||||
@@ -130,7 +130,7 @@ public abstract class MapreduceTestCase<T> extends ShardableTestCase {
|
||||
for (HeaderWrapper header : taskStateInfo.getHeaders()) {
|
||||
int value = parseAsQuotedInt(header.getValue());
|
||||
when(request.getIntHeader(header.getKey())).thenReturn(value);
|
||||
logger.finefmt("header: %s=%s", header.getKey(), header.getValue());
|
||||
logger.atFine().log("header: %s=%s", header.getKey(), header.getValue());
|
||||
when(request.getHeader(header.getKey())).thenReturn(header.getValue());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user