forked from AppSecDev/appscan-sdk
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from hclproducts/stdoutProgress
add StdOutProgress
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
src/main/java/com/hcl/appscan/sdk/logging/StdOutProgress.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | ||
} | ||
} |