Skip to content

Commit

Permalink
Merge pull request #158 from yahoo/info
Browse files Browse the repository at this point in the history
#157 domain updates in ZTS should be logged with INFO level
  • Loading branch information
havetisyan authored Jun 21, 2017
2 parents 6e7202c + c4e0b26 commit 9483e13
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ public boolean processDomain(SignedDomain signedDomain, boolean saveInStore) {
DomainData domainData = signedDomain.getDomain();
String domainName = domainData.getName();

if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Processing domain: {}", domainName);
if (LOGGER.isInfoEnabled()) {
LOGGER.info("Processing domain: {}", domainName);
}

/* if the domain is disabled we're going to skip
Expand Down Expand Up @@ -473,8 +473,8 @@ boolean processSignedDomains(SignedDomains signedDomains) {
* from ZMS Server */

if (signedDomains == null) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("No updates received from ZMS Server");
if (LOGGER.isInfoEnabled()) {
LOGGER.info("No updates received from ZMS Server");
}
return true;
}
Expand All @@ -483,8 +483,8 @@ boolean processSignedDomains(SignedDomains signedDomains) {

List<SignedDomain> domains = signedDomains.getDomains();
if (domains == null || domains.isEmpty()) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("No updates received from ZMS Server");
if (LOGGER.isInfoEnabled()) {
LOGGER.info("No updates received from ZMS Server");
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ public SignedDomains getUpdatedSignedDomains(StringBuilder lastModTimeBuffer) {
ArrayList<String> domains = new ArrayList<>();
listObjects(s3, domains, lastModTime);

if (LOGGER.isDebugEnabled()) {
LOGGER.debug("getUpdatedSignedDomains: {} updated domains", domains.size());
if (LOGGER.isInfoEnabled()) {
LOGGER.info("getUpdatedSignedDomains: {} updated domains", domains.size());
}

ArrayList<SignedDomain> signedDomainList = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ List<SignedDomain> getSignedDomainList(ZMSClient zmsClient, SignedDomains domain
final String domainName = domain.getDomain().getName();

if (LOGGER.isDebugEnabled()) {
LOGGER.debug("getUpdatedSignedDomains: fetching domain {}", domainName);
LOGGER.debug("getSignedDomainList: fetching domain {}", domainName);
}

try {
Expand All @@ -304,7 +304,7 @@ List<SignedDomain> getSignedDomainList(ZMSClient zmsClient, SignedDomains domain

if (singleDomain == null || singleDomain.getDomains().isEmpty()) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("getUpdatedSignedDomains: unable to fetch domain {}",
LOGGER.debug("getSignedDomainList: unable to fetch domain {}",
domainName);
}
continue;
Expand Down Expand Up @@ -350,6 +350,10 @@ public SignedDomains getUpdatedSignedDomains(StringBuilder lastModTimeBuffer) {
return null;
}

if (LOGGER.isInfoEnabled()) {
LOGGER.info("getUpdatedSignedDomains: {} updated domains", domainList.getDomains().size());
}

List<SignedDomain> domains = getSignedDomainList(zmsClient, domainList);
return new SignedDomains().setDomains(domains);

Expand Down

0 comments on commit 9483e13

Please sign in to comment.