CompSci / Programming Basics
About 1 min
data class FooBar(
val a: String = ""
val b: String = ""
val c: Boolean = false,
val d: Boolean = false,
val e: String = ""
) {
class Builder {
private var bA: String = ""; fun a(block: () -> String) { bA = block() }
private var bB: String = ""; fun b(block: () -> String) { bB = block() }
private var bC: String = ""; fun c(block: () -> String) { bC = block() }
private var bD: String = ""; fun d(block: () -> String) { bD = block() }
private var bE: String = ""; fun e(block: () -> String) { bE = block() }
fun build(): FooBar = FooBar(bA, bB, bC, bD, bE)
}
companion object {
inline fun builder(block: Builder.() -> Unit): FooBar = Builder().apply(block).build()
}
}
@tab:active 기본
status=warn
name=DemoLog
appenders = stdout
# 콘솔 출력 설정
appender.stdout.type = Console
appender.stdout.name = STDOUT
appender.stdout.layout.type = PatternLayout
appender.stdout.layout.pattern = [%t] %-5p : %c.%M(%F:%L) %-80m %n
appender.stdout.filter.threshold.type = ThresholdFilter
appender.stdout.filter.threshold.level = debug
rootLogger.level = debug
rootLogger.appenderRef.stdout.additivity = false
rootLogger.appenderRef.stdout.ref = STDOUT