Commit fe1cadfc by Spencer Gibb

added logging to eureka client auto config;

fixed running.md typo; added comment to turbine eureka instance discovery
parent 5a2edc5a
......@@ -65,7 +65,7 @@
## Sandbox Sample Backend
`spring-platform-sandbox-sample-backend$ java -jar target/spring-platform-sandbox-sample-backend-1.0.0.BUILD-SNAPSHOT.jar`0
`spring-platform-sandbox-sample-backend$ java -jar target/spring-platform-sandbox-sample-backend-1.0.0.BUILD-SNAPSHOT.jar`
## Sandbox Sample Frontend
......
......@@ -18,6 +18,8 @@ package org.springframework.platform.netflix.eureka;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
......@@ -43,6 +45,8 @@ import com.netflix.discovery.EurekaClientConfig;
public class EurekaClientAutoConfiguration implements
ApplicationListener<ContextRefreshedEvent> {
private static final Logger logger = LoggerFactory.getLogger(EurekaClientAutoConfiguration.class);
@Autowired
private EurekaClientConfigBean clientConfig;
......@@ -51,6 +55,7 @@ public class EurekaClientAutoConfiguration implements
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
logger.info("Registering application {} with eureka with status UP", instanceConfig.getAppname());
ApplicationInfoManager.getInstance().setInstanceStatus(InstanceStatus.UP);
}
......@@ -61,6 +66,7 @@ public class EurekaClientAutoConfiguration implements
@PreDestroy
public void close() {
logger.info("Removing application {} from eureka", instanceConfig.getAppname());
DiscoveryManager.getInstance().shutdownComponent();
}
......
......@@ -163,6 +163,7 @@ public class EurekaInstanceDiscovery implements InstanceDiscovery {
*/
protected String getClusterName(InstanceInfo iInfo) {
return iInfo.getASGName();
//TODO: why did this break things? return iInfo.getAppGroupName();
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment