Skip to content

Commit

Permalink
add logger
Browse files Browse the repository at this point in the history
  • Loading branch information
dojinyou committed Dec 6, 2023
1 parent 62c762c commit 1a4638f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ dependencies {
// convert
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")

// container
developmentOnly("org.springframework.boot:spring-boot-docker-compose")

// database
runtimeOnly("org.postgresql:postgresql")
implementation("org.liquibase:liquibase-core")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ class GlobalExceptionHandler {
@ResponseStatus(HttpStatus.BAD_REQUEST)
@ExceptionHandler(IllegalArgumentException::class)
fun handleIllegalArgumentException(exception: IllegalArgumentException): ApiResponse<Unit> {
log.warn(exception.stackTraceToString())
log.warn(exception.message)

Check warning on line 17 in src/main/kotlin/com/mjucow/eatda/presentation/common/GlobalExceptionHandler.kt

View check run for this annotation

Codecov / codecov/patch

src/main/kotlin/com/mjucow/eatda/presentation/common/GlobalExceptionHandler.kt#L17

Added line #L17 was not covered by tests
return ApiResponse.error(exception.message)
}

@ResponseStatus(HttpStatus.NOT_FOUND)
@ExceptionHandler(EntityNotFoundException::class)
fun handleEntityNotFoundException(exception: EntityNotFoundException): ApiResponse<Unit> {
log.warn(exception.stackTraceToString())
log.warn(exception.message)

Check warning on line 24 in src/main/kotlin/com/mjucow/eatda/presentation/common/GlobalExceptionHandler.kt

View check run for this annotation

Codecov / codecov/patch

src/main/kotlin/com/mjucow/eatda/presentation/common/GlobalExceptionHandler.kt#L24

Added line #L24 was not covered by tests
return ApiResponse.error(exception.message)
}

Expand Down

0 comments on commit 1a4638f

Please sign in to comment.