에러로그 stacktrace 컬럼 수정
This commit is contained in:
@@ -288,14 +288,11 @@ public class GlobalExceptionHandler {
|
||||
// TODO : 로그인 개발되면 이것도 연결해야 함
|
||||
Long userid = Long.valueOf(Optional.ofNullable(ApiLogFunction.getUserId(request)).orElse("1"));
|
||||
|
||||
// TODO : stackTrace limit 20줄? 확인 필요
|
||||
String stackTraceStr =
|
||||
Arrays.stream(stackTrace)
|
||||
// .limit(20)
|
||||
.map(StackTraceElement::toString)
|
||||
.collect(Collectors.joining("\n"))
|
||||
.substring(0, Math.min(stackTrace.length, 255));
|
||||
;
|
||||
.map(StackTraceElement::toString)
|
||||
.collect(Collectors.joining("\n"))
|
||||
.substring(0, Math.min(stackTrace.length, 255));
|
||||
|
||||
ErrorLogEntity errorLogEntity =
|
||||
new ErrorLogEntity(
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.kamco.cd.kamcoback.log.dto.EventType;
|
||||
import com.kamco.cd.kamcoback.postgres.CommonCreateEntity;
|
||||
import jakarta.persistence.*;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -32,7 +34,8 @@ public class ErrorLogEntity extends CommonCreateEntity {
|
||||
private String errorCode;
|
||||
private String errorMessage;
|
||||
|
||||
@Column(columnDefinition = "TEXT")
|
||||
@Size(max = 255)
|
||||
@Column(name = "stack_trace")
|
||||
private String stackTrace;
|
||||
|
||||
private Long handlerUid;
|
||||
|
||||
Reference in New Issue
Block a user