Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
ADDED: debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
AleixMT committed Jan 29, 2024
1 parent d45b717 commit 835d2ed
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public LoanResponse createLoan(LoanRequest request) {
throw new BadParametersException("One or more parameters of the request are wrong", null);
}

Logger.getGlobal().warning("hasta aki");
// If loan referencing non-existing books throw 404
if (! isExistingBook(loan.getBookId().toString()))
{
Expand Down Expand Up @@ -217,7 +218,7 @@ public List<LoanResponse> getLoansByClientId(Long clientId) {
private boolean isExistingBook(String id) {
try {
ResponseEntity<BookResponse> book = buscadorClient.getBook(id);
Logger.global.info("MyText");
Logger.getGlobal().warning("MyText");
return book != null;
}
catch(Exception e) {
Expand All @@ -228,7 +229,7 @@ private boolean isExistingBook(String id) {
private boolean isExistingClient(String id) {
try {
ResponseEntity<ClientResponse> client = buscadorClient.getClient(id);
Logger.global.info("MyText");
Logger.getGlobal().warning("MyText");
return client != null;
}
catch(Exception e) {
Expand Down

0 comments on commit 835d2ed

Please sign in to comment.