mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 14:54:51 +02:00
Update UpdateDomainCommand to use FormattingLogger
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=160299234
This commit is contained in:
parent
e63351ec73
commit
f721bda16d
2 changed files with 3 additions and 4 deletions
|
@ -34,7 +34,6 @@ java_library(
|
||||||
]),
|
]),
|
||||||
visibility = [":allowed-tools"],
|
visibility = [":allowed-tools"],
|
||||||
deps = [
|
deps = [
|
||||||
"//java/com/google/common/flogger",
|
|
||||||
"//java/google/registry/backup",
|
"//java/google/registry/backup",
|
||||||
"//java/google/registry/bigquery",
|
"//java/google/registry/bigquery",
|
||||||
"//java/google/registry/config",
|
"//java/google/registry/config",
|
||||||
|
|
|
@ -27,12 +27,12 @@ import com.google.common.collect.FluentIterable;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.ImmutableSortedSet;
|
import com.google.common.collect.ImmutableSortedSet;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.google.common.flogger.GoogleLogger;
|
|
||||||
import com.google.template.soy.data.SoyMapData;
|
import com.google.template.soy.data.SoyMapData;
|
||||||
import google.registry.model.domain.DesignatedContact;
|
import google.registry.model.domain.DesignatedContact;
|
||||||
import google.registry.model.domain.DomainResource;
|
import google.registry.model.domain.DomainResource;
|
||||||
import google.registry.model.eppcommon.StatusValue;
|
import google.registry.model.eppcommon.StatusValue;
|
||||||
import google.registry.tools.soy.DomainUpdateSoyInfo;
|
import google.registry.tools.soy.DomainUpdateSoyInfo;
|
||||||
|
import google.registry.util.FormattingLogger;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -43,7 +43,7 @@ import org.joda.time.DateTime;
|
||||||
@Parameters(separators = " =", commandDescription = "Update a new domain via EPP.")
|
@Parameters(separators = " =", commandDescription = "Update a new domain via EPP.")
|
||||||
final class UpdateDomainCommand extends CreateOrUpdateDomainCommand {
|
final class UpdateDomainCommand extends CreateOrUpdateDomainCommand {
|
||||||
|
|
||||||
private static final GoogleLogger logger = GoogleLogger.forEnclosingClass();
|
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||||
|
|
||||||
@Parameter(names = "--statuses", description = "Comma-separated list of statuses to set.")
|
@Parameter(names = "--statuses", description = "Comma-separated list of statuses to set.")
|
||||||
private List<String> statuses = new ArrayList<>();
|
private List<String> statuses = new ArrayList<>();
|
||||||
|
@ -182,7 +182,7 @@ final class UpdateDomainCommand extends CreateOrUpdateDomainCommand {
|
||||||
boolean change = registrant != null || password != null;
|
boolean change = registrant != null || password != null;
|
||||||
|
|
||||||
if (!add && !remove && !change) {
|
if (!add && !remove && !change) {
|
||||||
logger.atInfo().log("No changes need to be made to domain %s", domain);
|
logger.infofmt("No changes need to be made to domain %s", domain);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue