diff --git a/src/main/java/org/openhmis/webservice/ClientService.java b/src/main/java/org/openhmis/webservice/ClientService.java index 2e71999..fd528ca 100644 --- a/src/main/java/org/openhmis/webservice/ClientService.java +++ b/src/main/java/org/openhmis/webservice/ClientService.java @@ -53,7 +53,7 @@ public List getClients(@HeaderParam("Authorization") String authoriza format, some conventions, and maybe a helper class to enforce it all; would also be nice to log which user made the request. But for now, just show that logging works. */ - log.debug("GET /clients/ (" + clientDTOs.size() + " results)"); + log.info("GET /clients/ (" + clientDTOs.size() + " results)"); return clientDTOs; } @@ -65,6 +65,7 @@ public ClientDTO createClient(@HeaderParam("Authorization") String authorization if(!Authentication.googleAuthenticate(authorization, Authentication.WRITE)) throw new AccessDeniedException(); ClientDTO outputVO = clientManager.addClient(inputVO); + log.info("POST /clients/ (ID: " + outputVO.getId() + ")"); return outputVO; } @@ -75,7 +76,8 @@ public ClientDTO getClient(@HeaderParam("Authorization") String authorization, @ if(!Authentication.googleAuthenticate(authorization, Authentication.READ)) throw new AccessDeniedException(); ClientDTO clientDTO = clientManager.getClientByPersonalId(personalId); - return clientDTO; + log.info("GET /clients/" + personalId); + return clientDTO; } @PUT @@ -88,6 +90,7 @@ public ClientDTO updateClient(@HeaderParam("Authorization") String authorization inputVO.setPersonalId(personalId); ClientDTO outputVO = clientManager.updateClient(inputVO); + log.info("PUT /clients/" + personalId); return outputVO; } @@ -98,6 +101,7 @@ public String deleteClient(@HeaderParam("Authorization") String authorization, @ if(!Authentication.googleAuthenticate(authorization, Authentication.WRITE)) throw new AccessDeniedException(); clientManager.deleteClient(personalId); + log.info("DELETE /clients/" + personalId); return "true"; } } diff --git a/src/main/resources/log4j.xml b/src/main/resources/log4j.xml index 7358251..cf98277 100644 --- a/src/main/resources/log4j.xml +++ b/src/main/resources/log4j.xml @@ -22,9 +22,9 @@ - + - \ No newline at end of file +