Skip to content

Commit

Permalink
fix: logs should only printed in EXHORT_DEBUG=true (#100)
Browse files Browse the repository at this point in the history
Signed-off-by: Zvi Grinberg <zgrinber@redhat.com>
  • Loading branch information
zvigrinberg authored Apr 2, 2024
1 parent 364381b commit 5518c40
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/redhat/exhort/impl/ExhortApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public String getEndpoint() {
public static final void main(String[] args) throws IOException, InterruptedException, ExecutionException {
System.setProperty("EXHORT_DEV_MODE", "true");
AnalysisReport analysisReport = new ExhortApi()
.stackAnalysisMixed("/tmp/030324/requirements.txt").get().json;
.stackAnalysisMixed("/tmp/exhort_test_10582748308498949664/pom.xml").get().json;
// ObjectMapper om = new ObjectMapper().configure(SerializationFeature.WRITE_EMPTY_JSON_ARRAYS, false);
// System.out.println(om.writerWithDefaultPrettyPrinter().writeValueAsString(analysisReport));
// AnalysisReport analysisReport = new ExhortApi()
Expand Down Expand Up @@ -184,7 +184,9 @@ static HttpClient.Version getHttpVersion() {
private String commonHookBeginning(boolean startOfApi) {
if(startOfApi) {
generateClientRequestId();
LOG.info("Start of exhort-java-api client");
if (debugLoggingIsNeeded()) {
LOG.info("Start of exhort-java-api client");
}
}
else {
if(Objects.isNull(getClientRequestId())) {
Expand Down

0 comments on commit 5518c40

Please sign in to comment.