Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
BUG 1883 - Ensure that all debug logging is done conditionally
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
DistributedDataStore.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java
index bf541d95deadeb3e9ecce59c83cdb988934289a5..c780881a2ffad1ed50695b7a38111068ec2f8e3f 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java
@@
-76,9
+76,9
@@
public class DistributedDataStore implements DOMStore, SchemaContextListener, Au
Preconditions.checkNotNull(path, "path should not be null");
Preconditions.checkNotNull(listener, "listener should not be null");
Preconditions.checkNotNull(path, "path should not be null");
Preconditions.checkNotNull(listener, "listener should not be null");
-
- LOG.debug("Registering listener: {} for path: {} scope: {}", listener, path, scope);
-
+ if(LOG.isDebugEnabled()) {
+
LOG.debug("Registering listener: {} for path: {} scope: {}", listener, path, scope);
+ }
ActorRef dataChangeListenerActor = actorContext.getActorSystem().actorOf(
DataChangeListener.props(listener ));
ActorRef dataChangeListenerActor = actorContext.getActorSystem().actorOf(
DataChangeListener.props(listener ));
@@
-108,11
+108,11
@@
public class DistributedDataStore implements DOMStore, SchemaContextListener, Au
}, actorContext.getActorSystem().dispatcher());
return listenerRegistrationProxy;
}
}, actorContext.getActorSystem().dispatcher());
return listenerRegistrationProxy;
}
-
- LOG.debug(
- "No local shard for shardName {} was found so returning a noop registration",
- shardName);
-
+ if(LOG.isDebugEnabled()) {
+
LOG.debug(
+
"No local shard for shardName {} was found so returning a noop registration",
+
shardName);
+ }
return new NoOpDataChangeListenerRegistration(listener);
}
return new NoOpDataChangeListenerRegistration(listener);
}