변화탐지 API 커밋, 에러로그 진행중
This commit is contained in:
@@ -31,11 +31,18 @@ public class ErrorLogApiController {
|
||||
@RequestParam(required = false) LocalDate endDate,
|
||||
@RequestParam int page,
|
||||
@RequestParam(defaultValue = "20") int size) {
|
||||
ErrorLogDto.ErrorSearchReq searchReq =
|
||||
new ErrorLogDto.ErrorSearchReq(
|
||||
logErrorLevel, eventType, startDate, endDate, page, size, "created_dttm,desc");
|
||||
Page<ErrorLogDto.Basic> result = errorLogService.findLogByError(searchReq);
|
||||
try {
|
||||
|
||||
return ApiResponseDto.ok(result);
|
||||
ErrorLogDto.ErrorSearchReq searchReq =
|
||||
new ErrorLogDto.ErrorSearchReq(
|
||||
logErrorLevel, eventType, startDate, endDate, page, size, "created_dttm,desc");
|
||||
Page<ErrorLogDto.Basic> result = errorLogService.findLogByError(searchReq);
|
||||
return ApiResponseDto.ok(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package com.kamco.cd.kamcoback.log.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import com.kamco.cd.kamcoback.config.enums.EnumType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZonedDateTime;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -18,43 +15,21 @@ public class ErrorLogDto {
|
||||
|
||||
@Schema(name = "ErrorLogBasic", description = "에러로그 기본 정보")
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public static class Basic {
|
||||
|
||||
@JsonIgnore private final Long id;
|
||||
private final String requestId;
|
||||
private final Long id;
|
||||
private final String serviceName;
|
||||
private final String menuNm;
|
||||
private final String loginId;
|
||||
private final String userName;
|
||||
private final EventType errorType;
|
||||
private final String errorName;
|
||||
private final LogErrorLevel errorLevel;
|
||||
private final String errorCode;
|
||||
private final String errorMessage;
|
||||
private final String stackTrace;
|
||||
private final Long handlerUid;
|
||||
|
||||
@JsonFormatDttm private final ZonedDateTime handledDttm;
|
||||
|
||||
@JsonFormatDttm private final ZonedDateTime createdDttm;
|
||||
|
||||
public Basic(
|
||||
Long id,
|
||||
String requestId,
|
||||
EventType errorType,
|
||||
LogErrorLevel errorLevel,
|
||||
String errorCode,
|
||||
String errorMessage,
|
||||
String stackTrace,
|
||||
Long handlerUid,
|
||||
ZonedDateTime handledDttm,
|
||||
ZonedDateTime createdDttm) {
|
||||
this.id = id;
|
||||
this.requestId = requestId;
|
||||
this.errorType = errorType;
|
||||
this.errorLevel = errorLevel;
|
||||
this.errorCode = errorCode;
|
||||
this.errorMessage = errorMessage;
|
||||
this.stackTrace = stackTrace;
|
||||
this.handlerUid = handlerUid;
|
||||
this.handledDttm = handledDttm;
|
||||
this.createdDttm = createdDttm;
|
||||
}
|
||||
private final String createDate; // to_char해서 가져옴
|
||||
}
|
||||
|
||||
@Schema(name = "ErrorSearchReq", description = "에러로그 검색 요청")
|
||||
|
||||
Reference in New Issue
Block a user