Skip to content

Commit

Permalink
Merge pull request #3 from hclproducts/stdoutProgress
Browse files Browse the repository at this point in the history
add StdOutProgress
  • Loading branch information
mattmurp authored Jul 26, 2018
2 parents 04f192a + 0ea8582 commit 84d8bb5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/main/java/com/hcl/appscan/sdk/logging/StdOutProgress.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* © Copyright HCL Technologies Ltd. 2018.
* LICENSE: Apache License, Version 2.0 https://www.apache.org/licenses/LICENSE-2.0
*/

package com.hcl.appscan.sdk.logging;

/**
* An IProgress that sends all messages to stdout
*/
public class StdOutProgress implements IProgress {

@Override
public void setStatus(Message status) {
System.out.println(status.getSeverityString() + status.getText());
}

@Override
public void setStatus(Message status, Throwable e) {
System.out.println(status.getSeverityString() + status.getText() + "\n" + e.getLocalizedMessage());
}

@Override
public void setStatus(Throwable e) {
System.out.println(Message.ERROR_SEVERITY + e.getLocalizedMessage());
}
}

0 comments on commit 84d8bb5

Please sign in to comment.