Skip to content

Commit

Permalink
Call LOG instead of System.println.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfestal committed Mar 3, 2017
1 parent 2b51b65 commit 0eeb882
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@
import org.eclipse.che.api.testing.server.handler.TestingOutputImpl;
import org.eclipse.che.api.testing.shared.TestingOutput;
import org.eclipse.che.dto.server.DtoFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Listener for the testing services to report their progress to the Che output view.
*
* @author David Festal
*/
public class OutputTestListener extends AbstractTestListener implements AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(AbstractTestListener.class);

private WebsocketMessageConsumer<TestingOutput> consumer = new WebsocketMessageConsumer<>(TESTING_OUTPUT_CHANNEL_NAME);
private String stackTraceRoot;

Expand All @@ -39,8 +43,7 @@ private void writeLine(String line, TestingOutput.LineType lineType) {
try {
consumer.consume(DtoFactory.cloneDto(new TestingOutputImpl(line, lineType)));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
LOG.error("An exception occured while trying to send a 'TestingOutput' object through web sockets on the following channel: " + TESTING_OUTPUT_CHANNEL_NAME, e);
}
}

Expand Down

0 comments on commit 0eeb882

Please sign in to comment.