-
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.
Merge pull request #107 from grida-diary/main
Prod
- Loading branch information
Showing
6 changed files
with
23 additions
and
128 deletions.
There are no files selected for viewing
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
23 changes: 20 additions & 3 deletions
23
grida-core/core-api/src/main/kotlin/org/grida/config/CoreApiConfig.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,10 +1,27 @@ | ||
package org.grida.config | ||
|
||
import org.grida.support.requestlogger.EnableLogRequest | ||
import io.wwan13.springrequestlogger.configure.EnableLoggingRequest | ||
import io.wwan13.springrequestlogger.configure.LogMessageConfigurer | ||
import io.wwan13.springrequestlogger.context.RequestContext | ||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan | ||
import org.springframework.context.annotation.Configuration | ||
import java.util.function.Function | ||
|
||
@Configuration | ||
@ConfigurationPropertiesScan | ||
@EnableLogRequest | ||
class CoreApiConfig | ||
@EnableLoggingRequest | ||
class CoreApiConfig : LogMessageConfigurer { | ||
|
||
override fun format(): Function<RequestContext, String> { | ||
return Function { context -> | ||
""" | ||
| | ||
| ${context.method} '${context.uri}' - ${context.status} (${context.elapsed} s) | ||
| >> Request Headers : ${context.requestHeaders} | ||
| >> Request Params : ${context.requestParams} | ||
| >> Request Body : ${context.requestBody} | ||
| >> Response Body : ${context.responseBody} | ||
""".trimMargin() | ||
} | ||
} | ||
} |
8 changes: 0 additions & 8 deletions
8
grida-core/core-api/src/main/kotlin/org/grida/support/requestlogger/EnableLogRequest.kt
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
grida-core/core-api/src/main/kotlin/org/grida/support/requestlogger/LogFilter.kt
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
grida-core/core-api/src/main/kotlin/org/grida/support/requestlogger/LogFilterRegistrar.kt
This file was deleted.
Oops, something went wrong.
60 changes: 0 additions & 60 deletions
60
grida-core/core-api/src/main/kotlin/org/grida/support/requestlogger/RequestLogContext.kt
This file was deleted.
Oops, something went wrong.