-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ErrorType이 LogLevel을 들고 있을 수 있도록 수정, ControllerAdvice에서 이를 사용하여 로깅
- Loading branch information
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
7 changes: 4 additions & 3 deletions
7
src/main/kotlin/dnd11th/blooming/common/exception/ErrorType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
package dnd11th.blooming.common.exception | ||
|
||
import org.springframework.boot.logging.LogLevel | ||
import org.springframework.http.HttpStatus | ||
|
||
enum class ErrorType(val status: HttpStatus, val message: String) { | ||
INVALID_DATE(HttpStatus.BAD_REQUEST, "올바르지 않은 날짜입니다."), | ||
NOT_FOUND_PLANT_ID(HttpStatus.NOT_FOUND, "존재하지 않는 식물입니다."), | ||
enum class ErrorType(val status: HttpStatus, val message: String, val logLevel: LogLevel) { | ||
INVALID_DATE(HttpStatus.BAD_REQUEST, "올바르지 않은 날짜입니다.", LogLevel.DEBUG), | ||
NOT_FOUND_PLANT_ID(HttpStatus.NOT_FOUND, "존재하지 않는 식물입니다.", LogLevel.DEBUG), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters