mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02: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:
parent
0d2fb3a8f0
commit
70b13596e4
178 changed files with 984 additions and 988 deletions
|
@ -22,7 +22,7 @@ import static google.registry.model.eppcommon.ProtocolDefinition.ServiceExtensio
|
|||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import google.registry.flows.EppException.CommandUseErrorException;
|
||||
import google.registry.flows.EppException.SyntaxErrorException;
|
||||
import google.registry.flows.EppException.UnimplementedExtensionException;
|
||||
|
@ -45,7 +45,7 @@ import javax.inject.Inject;
|
|||
*/
|
||||
public final class ExtensionManager {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
/** Blacklist of extension URIs that cause an error if they are used without being declared. */
|
||||
private static final ImmutableSet<String> UNDECLARED_URIS_BLACKLIST = FEE_EXTENSION_URIS;
|
||||
|
@ -99,11 +99,9 @@ public final class ExtensionManager {
|
|||
if (!undeclaredUrisThatError.isEmpty()) {
|
||||
throw new UndeclaredServiceExtensionException(undeclaredUrisThatError);
|
||||
}
|
||||
logger.infofmt(
|
||||
logger.atInfo().log(
|
||||
"Client %s is attempting to run %s without declaring URIs %s on login",
|
||||
clientId,
|
||||
flowClass.getSimpleName(),
|
||||
undeclaredUris);
|
||||
clientId, flowClass.getSimpleName(), undeclaredUris);
|
||||
}
|
||||
|
||||
private void checkForRestrictedExtensions(
|
||||
|
@ -155,7 +153,7 @@ public final class ExtensionManager {
|
|||
ImmutableSet<Class<? extends CommandExtension>> unimplementedExtensions =
|
||||
unimplementedExtensionsBuilder.build();
|
||||
if (!unimplementedExtensions.isEmpty()) {
|
||||
logger.infofmt("Unimplemented extensions: %s", unimplementedExtensions);
|
||||
logger.atInfo().log("Unimplemented extensions: %s", unimplementedExtensions);
|
||||
throw new UnimplementedExtensionException();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue