Skip to content

Commit

Permalink
Polish log
Browse files Browse the repository at this point in the history
  • Loading branch information
lonre authored and nobodyiam committed Aug 11, 2021
1 parent 2c9b4dc commit 2e2919d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Apollo 1.9.0
* [Fix Multiple PropertySourcesPlaceholderConfigurer beans registered issue](https://github.com/ctripcorp/apollo/pull/3865)
* [use jdk 8 to publish apollo-client-config-data](https://github.com/ctripcorp/apollo/pull/3880)
* [fix apollo config data loader with profiles](https://github.com/ctripcorp/apollo/pull/3870)
* [polish log](https://github.com/ctripcorp/apollo/pull/3882)

------------------
All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/6?closed=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.google.common.collect.Multimaps;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
Expand All @@ -28,10 +29,13 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

import com.google.common.collect.Multimaps;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.BeanFactory;

public class SpringValueRegistry {
private static final Logger logger = LoggerFactory.getLogger(SpringValueRegistry.class);

private static final long CLEAN_INTERVAL_IN_SECONDS = 5;
private final Map<BeanFactory, Multimap<String, SpringValue>> registry = Maps.newConcurrentMap();
private final AtomicBoolean initialized = new AtomicBoolean(false);
Expand Down Expand Up @@ -70,7 +74,7 @@ public void run() {
try {
scanAndClean();
} catch (Throwable ex) {
ex.printStackTrace();
logger.error(ex.getMessage(), ex);
}
}
}, CLEAN_INTERVAL_IN_SECONDS, CLEAN_INTERVAL_IN_SECONDS, TimeUnit.SECONDS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class EmbeddedApollo extends ExternalResource {
CONFIG_SERVICE_LOCATOR_CLEAR = ConfigServiceLocator.class.getDeclaredMethod("initConfigServices");
CONFIG_SERVICE_LOCATOR_CLEAR.setAccessible(true);
} catch (NoSuchMethodException e) {
e.printStackTrace();
logger.error(e.getMessage(), e);
}
}

Expand Down

0 comments on commit 2e2919d

Please sign in to comment.