rsanchez
2015-01-30 71ddf7a4e293ff26e078edfd834adb7537b396ca
#2283 fix - Minor changes on log traces
2 files modified
changed files
securis/src/main/java/net/curisit/securis/DefaultExceptionHandler.java patch | view | blame | history
securis/src/main/java/net/curisit/securis/services/LicenseResource.java patch | view | blame | history
securis/src/main/java/net/curisit/securis/DefaultExceptionHandler.java
....@@ -40,13 +40,13 @@
4040 public Response toResponse(Exception e) {
4141 releaseEntityManager();
4242 if (e instanceof ForbiddenException) {
43
- LOG.warn("Unauthorized access to {}, user: {}", request.getPathInfo(), bsc.getUserPrincipal());
43
+ LOG.warn("ForbiddenException: {}", e);
4444 return Response.status(Status.UNAUTHORIZED).header(ERROR_CODE_MESSAGE_HEADER, ErrorCodes.INVALID_CREDENTIALS)
4545 .header(ERROR_MESSAGE_HEADER, "Unathorized access to the application").type(MediaType.APPLICATION_JSON).build();
4646 }
4747
4848 if (e instanceof SeCurisServiceException) {
49
- LOG.warn("SeCurisServiceException accessing to {}, user: {}", request.getPathInfo(), bsc.getUserPrincipal());
49
+ LOG.warn("SeCurisServiceException: {}", e);
5050 return Response.status(DEFAULT_APP_ERROR_STATUS_CODE).header(ERROR_CODE_MESSAGE_HEADER, ((SeCurisServiceException) e).getStatus())
5151 .header(ERROR_MESSAGE_HEADER, e.getMessage()).type(MediaType.APPLICATION_JSON).build();
5252 }
securis/src/main/java/net/curisit/securis/services/LicenseResource.java
....@@ -468,7 +468,7 @@
468468 MediaType.APPLICATION_JSON
469469 })
470470 public Response modify(License lic, @PathParam("licId") Integer licId, @Context BasicSecurityContext bsc) throws SeCurisServiceException {
471
- LOG.info("Modifying organization with id: {}", licId);
471
+ LOG.info("Modifying license with id: {}", licId);
472472
473473 // EntityManager em = emProvider.get();
474474