diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/ConfigServiceLocator.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/ConfigServiceLocator.java index fcd13b4424e1d9e0ce22721c2fcba518d42cd47a..8115feff6d4d49ee1b36aef4c7a9c08092f6ee48 100644 --- a/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/ConfigServiceLocator.java +++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/ConfigServiceLocator.java @@ -106,11 +106,11 @@ public class ConfigServiceLocator { transaction.setStatus(Transaction.SUCCESS); List services = response.getBody(); if (services == null || services.isEmpty()) { - logConfigServiceToCat("Empty response!"); + logConfigService("Empty response!"); continue; } m_configServices.set(services); - logConfigServicesToCat(services); + logConfigServices(services); return; } catch (Throwable ex) { Tracer.logEvent("ApolloConfigException", ExceptionUtil.getDetailMessage(ex)); @@ -145,13 +145,13 @@ public class ConfigServiceLocator { return domainName + "/services/config?" + MAP_JOINER.join(queryParams); } - private void logConfigServicesToCat(List serviceDtos) { + private void logConfigServices(List serviceDtos) { for (ServiceDTO serviceDto : serviceDtos) { - logConfigServiceToCat(serviceDto.getHomepageUrl()); + logConfigService(serviceDto.getHomepageUrl()); } } - private void logConfigServiceToCat(String serviceUrl) { + private void logConfigService(String serviceUrl) { Tracer.logEvent("Apollo.Config.Services", serviceUrl); } } diff --git a/apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/NotificationController.java b/apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/NotificationController.java index 9104ea174402e962677c2cbdea90e12a7899fbb6..e09aa12e28f47d5946919ac8263bdb28583be620 100644 --- a/apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/NotificationController.java +++ b/apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/NotificationController.java @@ -107,17 +107,17 @@ public class NotificationController implements ReleaseMessageListener { } deferredResult - .onTimeout(() -> logWatchedKeysToCat(watchedKeys, "Apollo.LongPoll.TimeOutKeys")); + .onTimeout(() -> logWatchedKeys(watchedKeys, "Apollo.LongPoll.TimeOutKeys")); deferredResult.onCompletion(() -> { //unregister all keys for (String key : watchedKeys) { deferredResults.remove(key, deferredResult); } - logWatchedKeysToCat(watchedKeys, "Apollo.LongPoll.CompletedKeys"); + logWatchedKeys(watchedKeys, "Apollo.LongPoll.CompletedKeys"); }); - logWatchedKeysToCat(watchedKeys, "Apollo.LongPoll.RegisteredKeys"); + logWatchedKeys(watchedKeys, "Apollo.LongPoll.RegisteredKeys"); logger.debug("Listening {} from appId: {}, cluster: {}, namespace: {}, datacenter: {}", watchedKeys, appId, cluster, namespace, dataCenter); } @@ -159,7 +159,7 @@ public class NotificationController implements ReleaseMessageListener { logger.debug("Notification completed"); } - private void logWatchedKeysToCat(Set watchedKeys, String eventName) { + private void logWatchedKeys(Set watchedKeys, String eventName) { for (String watchedKey : watchedKeys) { Tracer.logEvent(eventName, watchedKey); }