|
59 | 59 |
|
60 | 60 | import com.netflix.discovery.shared.resolver.EndpointRandomizer; |
61 | 61 | import com.netflix.discovery.shared.resolver.ResolverUtils; |
62 | | -import org.apache.commons.lang.exception.ExceptionUtils; |
63 | 62 | import org.slf4j.Logger; |
64 | 63 | import org.slf4j.LoggerFactory; |
65 | 64 |
|
@@ -812,8 +811,8 @@ public Applications getApplications(String serviceUrl) { |
812 | 811 | logger.info(PREFIX + "{} - was unable to refresh its cache! This periodic background refresh will be retried in {} seconds. status = {}", |
813 | 812 | appPathIdentifier, clientConfig.getRegistryFetchIntervalSeconds(), response.getStatusCode()); |
814 | 813 | } catch (Throwable th) { |
815 | | - logger.info(PREFIX + "{} - was unable to refresh its cache! This periodic background refresh will be retried in {} seconds. status = {} stacktrace = {}", |
816 | | - appPathIdentifier, clientConfig.getRegistryFetchIntervalSeconds(), th.getMessage(), ExceptionUtils.getStackTrace(th)); |
| 814 | + logger.info(String.format(PREFIX + "%s - was unable to refresh its cache! This periodic background refresh will be retried in %d seconds. status = %s", |
| 815 | + appPathIdentifier, clientConfig.getRegistryFetchIntervalSeconds(), th.getMessage()), th); |
817 | 816 | } |
818 | 817 | return null; |
819 | 818 | } |
@@ -965,8 +964,8 @@ private boolean fetchRegistry(boolean forceFullRegistryFetch) { |
965 | 964 | applications.setAppsHashCode(applications.getReconcileHashCode()); |
966 | 965 | logTotalInstances(); |
967 | 966 | } catch (Throwable e) { |
968 | | - logger.info(PREFIX + "{} - was unable to refresh its cache! This periodic background refresh will be retried in {} seconds. status = {} stacktrace = {}", |
969 | | - appPathIdentifier, clientConfig.getRegistryFetchIntervalSeconds(), e.getMessage(), ExceptionUtils.getStackTrace(e)); |
| 967 | + logger.info(String.format(PREFIX + "%s - was unable to refresh its cache! This periodic background refresh will be retried in %d seconds. status = %s", |
| 968 | + appPathIdentifier, clientConfig.getRegistryFetchIntervalSeconds(), e.getMessage()), e); |
970 | 969 | return false; |
971 | 970 | } finally { |
972 | 971 | SpectatorUtil.record(FETCH_REGISTRY_TIMER, monotonicTime); |
|
0 commit comments