Commit cb8b9363 by Spencer Gibb

Merge pull request #671 from alexVengrovsk/update-debug

Add isDebugEnabled() for logging operations
parents 11298720 8957a403
...@@ -81,8 +81,10 @@ public class InstanceRegistry extends PeerAwareInstanceRegistryImpl implements A ...@@ -81,8 +81,10 @@ public class InstanceRegistry extends PeerAwareInstanceRegistryImpl implements A
@Override @Override
public void register(InstanceInfo info, int leaseDuration, boolean isReplication) { public void register(InstanceInfo info, int leaseDuration, boolean isReplication) {
log.debug("register " + info.getAppName() + ", vip " + info.getVIPAddress() if (log.isDebugEnabled()) {
+ ", leaseDuration " + leaseDuration + ", isReplication " + isReplication); log.debug("register " + info.getAppName() + ", vip " + info.getVIPAddress()
+ ", leaseDuration " + leaseDuration + ", isReplication " + isReplication);
}
// TODO: what to publish from info (whole object?) // TODO: what to publish from info (whole object?)
this.ctxt.publishEvent(new EurekaInstanceRegisteredEvent(this, info, this.ctxt.publishEvent(new EurekaInstanceRegisteredEvent(this, info,
leaseDuration, isReplication)); leaseDuration, isReplication));
...@@ -92,8 +94,10 @@ public class InstanceRegistry extends PeerAwareInstanceRegistryImpl implements A ...@@ -92,8 +94,10 @@ public class InstanceRegistry extends PeerAwareInstanceRegistryImpl implements A
@Override @Override
public boolean cancel(String appName, String serverId, boolean isReplication) { public boolean cancel(String appName, String serverId, boolean isReplication) {
log.debug("cancel " + appName + " serverId " + serverId + ", isReplication {}" if (log.isDebugEnabled()) {
+ isReplication); log.debug("cancel " + appName + " serverId " + serverId + ", isReplication {}"
+ isReplication);
}
this.ctxt.publishEvent(new EurekaInstanceCanceledEvent(this, appName, serverId, this.ctxt.publishEvent(new EurekaInstanceCanceledEvent(this, appName, serverId,
isReplication)); isReplication));
...@@ -103,8 +107,10 @@ public class InstanceRegistry extends PeerAwareInstanceRegistryImpl implements A ...@@ -103,8 +107,10 @@ public class InstanceRegistry extends PeerAwareInstanceRegistryImpl implements A
@Override @Override
public boolean renew(final String appName, final String serverId, public boolean renew(final String appName, final String serverId,
boolean isReplication) { boolean isReplication) {
log.debug("renew " + appName + " serverId " + serverId + ", isReplication {}" if (log.isDebugEnabled()) {
+ isReplication); log.debug("renew " + appName + " serverId " + serverId + ", isReplication {}"
+ isReplication);
}
List<Application> applications = getSortedApplications(); List<Application> applications = getSortedApplications();
for (Application input : applications) { for (Application input : applications) {
if (input.getName().equals(appName)) { if (input.getName().equals(appName)) {
......
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