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:
jianglai 2018-05-25 13:56:19 -07:00
parent 92190f8699
commit 4be4fb0082
21 changed files with 69 additions and 52 deletions

View file

@ -25,6 +25,7 @@ import com.google.appengine.api.log.LogService;
import com.google.appengine.api.log.RequestLogs;
import com.google.apphosting.api.ApiProxy;
import com.google.common.collect.ImmutableList;
import com.google.common.flogger.LoggerConfig;
import com.google.common.testing.TestLogHandler;
import google.registry.testing.AppEngineRule;
import java.util.logging.Level;
@ -69,12 +70,12 @@ public final class RequestStatusCheckerImplTest {
public AppEngineRule appEngineRule = AppEngineRule.builder().build();
@Before public void setUp() {
RequestStatusCheckerImpl.logger.getFormattingLogger().addHandler(logHandler);
LoggerConfig.getConfig(RequestStatusCheckerImpl.class).addHandler(logHandler);
RequestStatusCheckerImpl.logService = mock(LogService.class);
}
@After public void tearDown() {
RequestStatusCheckerImpl.logger.getFormattingLogger().removeHandler(logHandler);
LoggerConfig.getConfig(RequestStatusCheckerImpl.class).removeHandler(logHandler);
}
// If a logId is unrecognized, it could be that the log hasn't been uploaded yet - so we assume