Skip to content

Commit

Permalink
Log creaper commands in JSON format in debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mchoma committed Feb 13, 2017
1 parent 84079a9 commit 5af0ed4
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package org.wildfly.extras.creaper.core.online;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import org.jboss.as.cli.CliInitializationException;
import org.jboss.as.cli.CommandContext;
import org.jboss.as.cli.CommandFormatException;
Expand All @@ -12,12 +18,6 @@
import org.wildfly.extras.creaper.core.ServerVersion;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

final class OnlineManagementClientImpl implements OnlineManagementClient {
private static final Logger log = Logger.getLogger(OnlineManagementClient.class);

Expand Down Expand Up @@ -150,6 +150,7 @@ public ModelNodeResult execute(ModelNode operation) throws IOException {
checkClosed();
operation = adjustOperationForDomain.adjust(operation);
log.debugf("Executing operation %s", ModelNodeOperationToCliString.convert(operation));
log.tracef("JSON format:\n%s", operation.toJSONString(false));
ModelNode result = client.execute(operation);
return new ModelNodeResult(result);
}
Expand All @@ -159,6 +160,7 @@ public ModelNodeResult execute(Operation operation) throws IOException {
checkClosed();
operation = adjustOperationForDomain.adjust(operation);
log.debugf("Executing operation %s", ModelNodeOperationToCliString.convert(operation.getOperation()));
log.tracef("JSON format:%n%s", operation.getOperation().toJSONString(false));
ModelNode result = client.execute(operation);
return new ModelNodeResult(result);
}
Expand Down

0 comments on commit 5af0ed4

Please sign in to comment.