Skip to content

Commit

Permalink
Output Neutralization for Logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinargade123 committed Aug 16, 2023
1 parent 3bc8a27 commit efa4222
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotV

Object inputRequest = ex.getBindingResult().getTarget();
if (inputRequest != null)
log.error(inputRequest.toString());
log.error(LogUtil.encode(inputRequest.toString()));

ex.getBindingResult().getAllErrors().forEach(error -> {
String fieldName = ((FieldError) error).getField();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

package org.eclipse.tractusx.autosetup.exception;

import org.eclipse.tractusx.autosetup.utility.LogUtil;

import lombok.extern.slf4j.Slf4j;

@Slf4j
Expand All @@ -32,6 +34,6 @@ public class ServiceException extends RuntimeException {

public ServiceException(String exceptionstr) {
super(exceptionstr);
log.error(exceptionstr);
log.error(LogUtil.encode(exceptionstr));
}
}

0 comments on commit efa4222

Please sign in to comment.