[Swift-commit] r3398 - in branches/woz-01/src/org/griphyn/vdl: karajan/lib mapping
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Tue Jun 22 12:08:17 CDT 2010
Author: wozniak
Date: 2010-06-22 12:08:17 -0500 (Tue, 22 Jun 2010)
New Revision: 3398
Modified:
branches/woz-01/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java
branches/woz-01/src/org/griphyn/vdl/mapping/AbstractDataNode.java
Log:
Move some logging from INFO to DEBUG
Modified: branches/woz-01/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java
===================================================================
--- branches/woz-01/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2010-06-21 18:23:44 UTC (rev 3397)
+++ branches/woz-01/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java 2010-06-22 17:08:17 UTC (rev 3398)
@@ -10,6 +10,7 @@
import org.globus.cog.karajan.workflow.futures.FutureNotYetAvailable;
import org.griphyn.vdl.karajan.Pair;
import org.griphyn.vdl.karajan.PairIterator;
+import org.griphyn.vdl.mapping.AbstractDataNode;
import org.griphyn.vdl.mapping.DSHandle;
import org.griphyn.vdl.mapping.InvalidPathException;
import org.griphyn.vdl.mapping.Path;
@@ -32,9 +33,9 @@
Path path = parsePath(OA_PATH.getValue(stack), stack);
DSHandle leaf = var.getField(path);
DSHandle value = (DSHandle) PA_VALUE.getValue(stack);
- if (logger.isInfoEnabled()) {
- logger.info("Setting " + leaf + " to " + value);
- }
+
+ log(leaf, value);
+
synchronized (var.getRoot()) {
// TODO want to do a type check here, for runtime type checking
// and pull out the appropriate internal value from value if it
@@ -61,7 +62,20 @@
}
}
- /** make dest look like source - if its a simple value, copy that
+ private void log(DSHandle leaf, DSHandle value) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Setting " + leaf + " to " + value);
+ }
+ else {
+ if (leaf instanceof AbstractDataNode) {
+ AbstractDataNode data = (AbstractDataNode) leaf;
+ String name = data.getDisplayableName();
+ logger.info("Set: " + name + "=" + value);
+ }
+ }
+ }
+
+ /** make dest look like source - if its a simple value, copy that
and if its an array then recursively copy */
void deepCopy(DSHandle dest, DSHandle source, VariableStack stack) throws ExecutionException {
if (source.getType().isPrimitive()) {
Modified: branches/woz-01/src/org/griphyn/vdl/mapping/AbstractDataNode.java
===================================================================
--- branches/woz-01/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2010-06-21 18:23:44 UTC (rev 3397)
+++ branches/woz-01/src/org/griphyn/vdl/mapping/AbstractDataNode.java 2010-06-22 17:08:17 UTC (rev 3398)
@@ -151,7 +151,7 @@
return sb.toString();
}
- protected String getDisplayableName() {
+ public String getDisplayableName() {
String prefix = getRoot().getParam("dbgname");
if (prefix == null) {
prefix = getRoot().getParam("prefix");
@@ -395,7 +395,7 @@
this.closed = true;
notifyListeners();
if (logger.isInfoEnabled()) {
- logger.info("closed " + this.getIdentifyingString());
+ logger.debug("closed " + this.getIdentifyingString());
}
// so because its closed, we can dump the contents
More information about the Swift-commit
mailing list