Skip to content

Commit

Permalink
add more logging to the transaction controller in the server
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed Sep 30, 2024
1 parent 626e0b1 commit eeeb28f
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -637,6 +638,24 @@ private ModelAndView getSparqlUpdateResult(Transaction transaction, HttpServletR
}
}

if (logger.isDebugEnabled()) {
StringBuilder datasetStr = new StringBuilder();
dataset.getDefaultGraphs()
.forEach(g -> datasetStr.append("DEFAULT GRAPH: FROM <").append(g.stringValue()).append(">\n"));
dataset.getNamedGraphs()
.forEach(g -> datasetStr.append("NAMED GRAPH: FROM NAMED <").append(g.stringValue()).append(">\n"));
dataset.getDefaultRemoveGraphs()
.forEach(g -> datasetStr.append("DEFAULT REMOVE GRAPH: DELETE FROM <")
.append(g.stringValue())
.append(">\n"));
Optional.ofNullable(dataset.getDefaultInsertGraph())
.ifPresent(g -> datasetStr.append("DEFAULT INSERT GRAPH: INSERT INTO <")
.append(g.stringValue())
.append(">\n"));

logger.debug("Dataset: {}", datasetStr);
}

try {
// determine if any variable bindings have been set on this update.
@SuppressWarnings("unchecked")
Expand Down

0 comments on commit eeeb28f

Please sign in to comment.