에러 로그 stack_trace 컬럼 text로 수정

This commit is contained in:
2025-12-23 09:47:43 +09:00
parent 95c01c693b
commit a7678dad25
2 changed files with 10 additions and 11 deletions

View File

@@ -13,11 +13,6 @@ import com.kamco.cd.kamcoback.postgres.entity.ErrorLogEntity;
import com.kamco.cd.kamcoback.postgres.repository.log.ErrorLogRepository;
import jakarta.persistence.EntityNotFoundException;
import jakarta.servlet.http.HttpServletRequest;
import java.nio.file.AccessDeniedException;
import java.time.ZonedDateTime;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.annotation.Order;
import org.springframework.dao.DataIntegrityViolationException;
@@ -34,6 +29,12 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.client.HttpServerErrorException;
import org.springframework.web.multipart.MaxUploadSizeExceededException;
import java.nio.file.AccessDeniedException;
import java.time.ZonedDateTime;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.stream.Collectors;
@Slf4j
@Order(value = 1)
@RestControllerAdvice
@@ -463,8 +464,7 @@ public class GlobalExceptionHandler {
String stackTraceStr =
Arrays.stream(stackTrace)
.map(StackTraceElement::toString)
.collect(Collectors.joining("\n"))
.substring(0, Math.min(stackTrace.length, 255));
.collect(Collectors.joining("\n"));
ErrorLogEntity errorLogEntity =
new ErrorLogEntity(