Skip to content

Commit

Permalink
RAS-930 Reduce collection exercise logging level to info (#325)
Browse files Browse the repository at this point in the history
* updating logging level

* auto patch increment

* updating level of logs

---------

Co-authored-by: ras-rm-pr-bot <[email protected]>
  • Loading branch information
arroyoAle and ras-rm-pr-bot authored Nov 23, 2023
1 parent 49fb270 commit a37c8b9
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions _infra/helm/collection-exercise/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 13.0.23
version: 13.0.24

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 13.0.23
appVersion: 13.0.24

Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ private SurveyDTO getSurveyFromCollex(
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
public ResponseEntity<CollectionExercise> deleteCollectionExercise(
@PathVariable("id") final UUID id) throws CTPException {
log.with("collection_exercise_id", id).debug("Deleting collection exercise");
log.with("collection_exercise_id", id).info("Deleting collection exercise");
collectionExerciseService.deleteCollectionExercise(id);

return ResponseEntity.accepted().build();
Expand Down Expand Up @@ -746,7 +746,7 @@ public ResponseEntity<?> createCollectionExerciseEvent(
@PathVariable("id") final UUID id, final @RequestBody EventDTO eventDto) throws CTPException {
log.with("collection_exercise_id", id)
.with("event_tag", eventDto.getTag())
.debug("Creating event for collection exercise");
.info("Creating event for collection exercise");

eventDto.setCollectionExerciseId(id);
Event newEvent;
Expand Down Expand Up @@ -883,7 +883,7 @@ public ResponseEntity<Event> deleteCollectionExerciseEvent(
throws CTPException {
log.with("event_id", id)
.with("tag", tag)
.debug("Deleting collection exercise event id, event tag ");
.info("Deleting collection exercise event id, event tag ");

eventService.deleteEvent(id, tag);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public CollectionExercise createCollectionExercise(
CollectionExerciseDTO collex, SurveyDTO survey) {
log.with("survey_ref", survey.getSurveyRef())
.with("exercise_ref", collex.getExerciseRef())
.debug("Creating collection exercise");
.info("Creating collection exercise");
CollectionExercise collectionExercise = newCollectionExerciseFromDTO(collex);
collectionExercise = this.collectRepo.saveAndFlush(collectionExercise);
log.with("collection_exercise_id", collectionExercise.getId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public void processEvents() {
}
} else {
log.with("tag", event.getTag())
.debug("Event is not actionable, setting to COMPLETED state");
.info("Event is not actionable, setting to COMPLETED state");
event.setStatus(EventDTO.Status.PROCESSED);
}
eventRepository.saveAndFlush(event);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ info:
logging:
useJson: false
level:
uk.gov.ons.ctp: DEBUG
uk.gov.ons.ctp: INFO
org.springframework.context.annotation.ConfigurationClassPostProcessor: ERROR
profile: DEV

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/uk/gov/ons/ctp/lib/common/FixtureHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private static <T> List<T> actuallyLoadFixtures(
File file = new File(ClassLoader.getSystemResource(path).getFile());
dummies = Arrays.asList(mapper.readValue(file, clazz));
} catch (Throwable t) {
log.debug("Problem loading fixture {} reason {}", path, t.getMessage());
log.warn("Problem loading fixture {} reason {}", path, t.getMessage());
throw t;
}
return dummies;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private static <T> List<T> actuallyLoadFixtures(
File file = new File(ClassLoader.getSystemResource(path).getFile());
dummies = Arrays.asList(mapper.readValue(file, clazz));
} catch (Throwable t) {
log.debug("Problem loading fixture {} reason {}", path, t.getMessage());
log.warn("Problem loading fixture {} reason {}", path, t.getMessage());
throw t;
}
return dummies;
Expand Down

0 comments on commit a37c8b9

Please sign in to comment.