Skip to content

Commit

Permalink
Merge pull request #351 from ghadyg/modifying-log-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
josdem authored Sep 26, 2024
2 parents 289e82c + 222de9a commit ae37817
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ private void initBinder(WebDataBinder binder) {

@GetMapping(value = "/descriptionForAdoption")
public ModelAndView descriptionForAdoption(AdoptionCommand adoptionCommand) {
log.info("Adding description to pet with uuid: " + adoptionCommand.getUuid());
log.info("Adding description to pet with uuid: {}", adoptionCommand.getUuid());
ModelAndView modelAndView = new ModelAndView();
return fillPetAndAdoptionCommand(modelAndView, adoptionCommand);
}

@PostMapping(value = "/save")
public ModelAndView save(@Valid AdoptionCommand adoptionCommand, BindingResult bindingResult) {
log.info("Creating adoption description for pet: " + adoptionCommand.getUuid());
log.info("Creating adoption description for pet: {}", adoptionCommand.getUuid());
if (bindingResult.hasErrors()) {
ModelAndView modelAndView = new ModelAndView("adoption/descriptionForAdoption");
fillPetAndAdoptionCommand(modelAndView, adoptionCommand);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class BreedController {
@GetMapping(value = "/list")
@ResponseBody
public List<Breed> listByType(@RequestParam String type, HttpServletResponse response) {
log.info("Listing Pets by type: " + type);
log.info("Listing Pets by type: {}", type);

response.addHeader("Allow-Control-Allow-Methods", "GET");
response.addHeader("Access-Control-Allow-Origin", "*");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class PetLogController {

@GetMapping(value = "/create")
public ModelAndView create(@RequestParam("uuid") String uuid, HttpServletRequest request) {
log.info("Pet uuid: " + uuid);
log.info("Pet uuid: {}", uuid);
ModelAndView modelAndView = new ModelAndView("petlog/create");
Command petLogCommand = new PetLogCommand();
modelAndView.addObject(PET_LOG_COMMAND, petLogCommand);
Expand All @@ -75,7 +75,7 @@ public ModelAndView create(@RequestParam("uuid") String uuid, HttpServletRequest
public ModelAndView save(
@Valid PetLogCommand petLogCommand, BindingResult bindingResult, HttpServletRequest request)
throws IOException {
log.info("Creating petLog: " + petLogCommand.getPet());
log.info("Creating petLog: {}", petLogCommand.getPet());
ModelAndView modelAndView = new ModelAndView("petlog/create");
Pet pet = petService.getPetById(petLogCommand.getPet());
User currentUser = userService.getCurrentUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class TelephoneController {
@PostMapping(value = "/save")
public ModelAndView save(
@Valid TelephoneCommand telephoneCommand, BindingResult bindingResult, HttpServletRequest request) {
log.info("Saving adoption for pet: " + telephoneCommand.getUuid());
log.info("Saving adoption for pet: {}", telephoneCommand.getUuid());
if (bindingResult.hasErrors()) {
ModelAndView modelAndView = new ModelAndView("telephone/adopt");
return fillPetAndTelephoneCommand(modelAndView, telephoneCommand);
Expand All @@ -69,7 +69,7 @@ public ModelAndView save(

@GetMapping(value = "/adopt")
public ModelAndView adopt(TelephoneCommand telephoneCommand) {
log.info("Adoption to pet with uuid: " + telephoneCommand.getUuid());
log.info("Adoption to pet with uuid: {}", telephoneCommand.getUuid());
ModelAndView modelAndView = new ModelAndView("telephone/adopt");
return fillPetAndTelephoneCommand(modelAndView, telephoneCommand);
}
Expand Down

0 comments on commit ae37817

Please sign in to comment.