Skip to content

Commit

Permalink
secureCodeBox#121 USe Logging Facade Instead of System.out
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Strittmatter <[email protected]>
  • Loading branch information
Weltraumschaf committed Feb 16, 2024
1 parent c29f4c2 commit 3d76d32
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import io.securecodebox.persistence.defectdojo.config.Config;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.Credentials;
Expand All @@ -24,6 +25,7 @@
/**
* Placeholder to move duplicated code, will be named better later
*/
@Slf4j
public final class Foo {
private final Config config;
private final ProxyConfig proxyConfig;
Expand All @@ -44,8 +46,7 @@ public HttpHeaders generateAuthorizationHeaders() {
headers.set(HttpHeaders.AUTHORIZATION, "Token " + this.config.getApiKey());

if (proxyConfig.isComplete()) {
// FIXME: System.out logging is a real bad code smell. Standard loging should be used.
System.out.println("Setting Proxy Auth Header...");
log.info("Setting Proxy Auth Header...");
headers.set(HttpHeaders.PROXY_AUTHORIZATION, "Basic " + encodeProxyCredentials(proxyConfig));
}

Expand Down

0 comments on commit 3d76d32

Please sign in to comment.