Skip to content

Commit

Permalink
In debug mode, log the Jira queries
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Jan 18, 2024
1 parent 98d7cc3 commit b3bfc8b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,16 @@

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableMap;
import dashboard.domain.Action;
import dashboard.domain.Action.Type;
import dashboard.domain.Change;
import dashboard.domain.JiraFilter;
import dashboard.domain.JiraResponse;
import dashboard.service.impl.JiraTicketSummaryAndDescriptionBuilder.SummaryAndDescription;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.http.*;

import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.client.HttpClientErrorException;
Expand Down Expand Up @@ -140,6 +137,11 @@ public JiraResponse searchTasks(String idp, JiraFilter jiraFilter) {
"maxResults", jiraFilter.getMaxResults(),
"startAt", jiraFilter.getStartAt(),
"fields", this.standardFields);

if (LOG.isDebugEnabled()) {
LOG.debug("Sending query to Jira: " + body);
}

HttpEntity<Map<String, Object>> entity = new HttpEntity<>(body, defaultHeaders);

String url = baseUrl + "/search";
Expand Down

0 comments on commit b3bfc8b

Please sign in to comment.