Releases: Numichi/reactive-logger
Releases · Numichi/reactive-logger
v3.0.0-RC3
Changed builder to getLogger method. Builder methods have been removed.
- CoroutineKLogger.getLogger(...)
- CoroutineLogger.getLogger(...)
- ReactorKLogger.getLogger(...)
- ReactorLogger.getLogger(...)
v3.0.0-RC1
fix: unnecessary line removal
v2.1.3
v2.1.2
v2.1.1
Simplification
MDCContext.modifyContext(Cotnext, (MDC) -> Unit): Context
// Mono or Flux
.contextWrite { ctx -> MDCContext.modifyContext(ctx) { it: MDC -> it["key"] = "value" } }
Library limitation in Coroutine scope
Its use has not changed. There was no need for Context. ContextView is enough for function.
// old
typealias CCResolveFn<E> = suspend (CCKey<out E>) -> Context?
fun <E : CoroutineContext.Element> builder(element: CCKey<E>, contextExtractive: CCResolveFn<E>): Builder<E> { ... }
// new
typealias CCResolveFn<E> = suspend (CCKey<out E>) -> ContextView?
fun <E : CoroutineContext.Element> builder(element: CCKey<E>, contextExtractive: CCResolveFn<E>): Builder<E> { ... }
// usage:
CoroutineLogger.builder(ReactorContext) { coroutineContext[it]?.context }.build()
v2.1.0
Feature:
extract MDC from Context in "contextWrite" and thus simplifies context writing
val data = MDCContext.read() // Mono<MDC> by default context key
.mapNotNull { it["key"] }
.contextWrite {
val mdc = MDCContext.getMDCOrDefault(it) // return: MDC, if not exist define, it will create a default
mdc["key"] = "example"
MDCContext.put(it, mdc) // result: Context
}
StepVerifier.create(data2)
.expectNext("example")
.verifyComplete()
Deprecated
withEnableError
builder method because the name is not accurate. EnableError and paramter is false.. It is misleading. Change to:- if not called, the error configuration is disabled
withError()
set to true by default- you can configure it directly by the
withError(boolean)
.
v2.0.1
v2.0.0
v2.0.0-RC1
Add LoggerFactory and set to ContextView where not need Context
v2.0.0-RC0
v2.0.0-RC0