Skip to content

Commit

Permalink
add StdOutProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Murphy committed Jul 26, 2018
1 parent 04f192a commit 0ea8582
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 0ea8582

Please sign in to comment.