Skip to content

Commit

Permalink
Log creaper commands in JSON format in debug
Browse files Browse the repository at this point in the history
Resolves #151
  • Loading branch information
mchoma committed Feb 13, 2017
1 parent 84079a9 commit 453157c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ public void apply(Iterable<OnlineCommand> commands) throws CommandFailedExceptio
public ModelNodeResult execute(ModelNode operation) throws IOException {
checkClosed();
operation = adjustOperationForDomain.adjust(operation);
log.debugf("Executing operation %s", ModelNodeOperationToCliString.convert(operation));
log.debugf("Executing operation %s%nJSON format:%n%s", ModelNodeOperationToCliString.convert(operation),
operation.toJSONString(false));
ModelNode result = client.execute(operation);
return new ModelNodeResult(result);
}
Expand All @@ -158,7 +159,9 @@ public ModelNodeResult execute(ModelNode operation) throws IOException {
public ModelNodeResult execute(Operation operation) throws IOException {
checkClosed();
operation = adjustOperationForDomain.adjust(operation);
log.debugf("Executing operation %s", ModelNodeOperationToCliString.convert(operation.getOperation()));
log.debugf("Executing operation %s%nJSON format:%n%s",
ModelNodeOperationToCliString.convert(operation.getOperation()),
operation.getOperation().toJSONString(false));
ModelNode result = client.execute(operation);
return new ModelNodeResult(result);
}
Expand Down

0 comments on commit 453157c

Please sign in to comment.