Skip to content

Commit

Permalink
- Endrer loglevel fra INFO til TRACE for "Setter opp proxy host".
Browse files Browse the repository at this point in the history
- Fjerner noen Sonar warnings.
  • Loading branch information
rfc3092 committed Nov 27, 2024
1 parent ea6439f commit 3da4604
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public AzureAdProfileConsumer(
.build());

if (proxyHost != null) {
log.info("Setter opp proxy host {} for Azure Ad", proxyHost);
log.trace("Setter opp proxy host {} for Azure Ad", proxyHost);
var uri = URI.create(proxyHost);
builder.clientConnector(new ReactorClientHttpConnector(
HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public AzureAdTokenService(
.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);

if (proxyHost != null) {
log.info("Setter opp proxy host {} for Client Credentials", proxyHost);
log.trace("Setter opp proxy host {} for Client Credentials", proxyHost);
var uri = URI.create(proxyHost);
builder.clientConnector(new ReactorClientHttpConnector(
HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public ReactiveJwtDecoder jwtDecoder() {
private WebClient buildProxyWebClient(String proxyHost) {
var builder = WebClient.builder();
if (proxyHost != null) {
log.info("Setter opp proxy host {} for jwt decoder.", proxyHost);
log.trace("Setter opp proxy host {} for jwt decoder.", proxyHost);
var uri = URI.create(proxyHost);
builder.clientConnector(new ReactorClientHttpConnector(
HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public AzureAdTokenService(
.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);

if (proxyHost != null) {
log.info("Setter opp proxy host {} for Client Credentials", proxyHost);
log.trace("Setter opp proxy host {} for Client Credentials", proxyHost);
var uri = URI.create(proxyHost);
builder.clientConnector(new ReactorClientHttpConnector(
HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public NavAzureAdTokenService(
.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);

if (proxyHost != null) {
log.info("Setter opp proxy host {} for Client Credentials", proxyHost);
log.trace("Setter opp proxy host {} for Client Credentials", proxyHost);
var uri = URI.create(proxyHost);
HttpClient httpClient = HttpClient
.create()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public TrygdeetatenAzureAdTokenService(
.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);

if (nonNull(proxyHost)) {
log.info("Setter opp proxy host {} for Client Credentials", proxyHost);
log.trace("Setter opp proxy host {} for Client Credentials", proxyHost);
var uri = URI.create(proxyHost);
builder.clientConnector(new ReactorClientHttpConnector(
HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public AzureAdTokenService(
.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);

if (proxyHost != null) {
log.info("Setter opp proxy host {} for Client Credentials", proxyHost);
log.trace("Setter opp proxy host {} for Client Credentials", proxyHost);
var uri = URI.create(proxyHost);
builder.clientConnector(new ReactorClientHttpConnector(
HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public AzureAdTokenService(
.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE);

if (proxyHost != null) {
log.info("Setter opp proxy host {} for Client Credentials", proxyHost);
log.trace("Setter opp proxy host {} for Client Credentials", proxyHost);
var uri = URI.create(proxyHost);
builder.clientConnector(new ReactorClientHttpConnector(
HttpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public SlackConsumer(
this.token = token;
this.applicationName = applicationName;
if (proxyHost != null) {
log.info("Setter opp proxy host {} for Slack api", proxyHost);
log.trace("Setter opp proxy host {} for Slack api", proxyHost);
var uri = URI.create(proxyHost);
webClientBuilder.clientConnector(new ReactorClientHttpConnector(
HttpClient
Expand All @@ -47,15 +47,15 @@ public SlackConsumer(
public void publish(Message message) {
log.info("Publiserer melding til slack.");
SlackResponse response = new PublishMessageCommand(webClient, token, message).call();
if (!response.getOk()) {
if (!Boolean.TRUE.equals(response.getOk())) {
throw new SlackConsumerException("Klarer ikke aa opprette slack melding", response);
}
}

public void uploadFile(byte[] file, String fileName, String channel) {
log.info("Publiserer fil til slack.");
SlackResponse response = new UploadFileCommand(webClient, token, file, fileName, channel, applicationName).call();
if (!response.getOk()) {
if (!Boolean.TRUE.equals(response.getOk())) {
throw new SlackConsumerException("Klarer ikke aa opprette slack melding", response);
}
}
Expand Down

0 comments on commit 3da4604

Please sign in to comment.