You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2018/03/27 17:55:36 UTC
[16/25] logging-log4j-kotlin git commit: KotlinLogger drops
parameterized methods
http://git-wip-us.apache.org/repos/asf/logging-log4j-kotlin/blob/f5b067f8/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt
----------------------------------------------------------------------
diff --git a/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt b/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt
index 92c020c..853ea9c 100644
--- a/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt
+++ b/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt
@@ -17,28 +17,20 @@
package org.apache.logging.log4j.kotlin
import org.apache.logging.log4j.Level
-import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.Marker
import org.apache.logging.log4j.message.EntryMessage
import org.apache.logging.log4j.message.Message
import org.apache.logging.log4j.spi.ExtendedLogger
-import org.apache.logging.log4j.util.MessageSupplier
-import org.apache.logging.log4j.util.Supplier
-import kotlin.reflect.full.companionObject
/**
- * An adapter supporting cleaner syntax when calling a logger via Kotlin. A Kotlin lambda can
- * easily be passed to Log4j2 as a `Supplier` via Kotlin's automatic conversion from lambda's to
- * SAM types. However, the compiler selects the incorrect overload of the method unless the lambda
- * type is specified explicitly as `Supplier`, resulting in the lambda itself being logged rather than
- * its evaluation.
+ * An adapter supporting cleaner syntax when calling a logger via Kotlin. This differs from
+ * [KotlinCompleteLogger] in that it does not implement the Log4j2 [Logger] interface, but instead
+ * limits logging methods to those that would be natural to use from Kotlin. For example,
+ * the various logging-parameter methods necessary for Java are eschewed in favor of Kotlin
+ * lambdas and String interpolation.
*
- * To avoid this, this delegate provides logging methods that take a native Kotlin Lambda as argument, and
- * then delegate to the underlying Log4j2 method taking a `Supplier`. Just as the Supplier-methods in
- * Log4j2, this does not evaluate the lambda, if the logging level is not enabled.
- *
- * Therefore, one can use Kotlin's String interpolation for logging without the performance impact of
+ * One can use Kotlin's String interpolation for logging without the performance impact of
* evaluating the parameters if the level is not enabled e.g.:
*
* ```
@@ -53,529 +45,236 @@ import kotlin.reflect.full.companionObject
* log.error(exc) { "Unexpected exception evaluating $whatever." }
* ```
*
- * Finally, the adapter also provides a `runInTrace` utility that avoids having to call traceEnter and traceExit
+ * The adapter also provides a `runInTrace` utility that avoids having to call traceEnter and traceExit
* and catch manually. Rather, simply call the `trace` method, passing in an [EntryMessage] and the block to
* execute within trace enter/exit/catch calls. Location-awareness is currently broken for trace logging with this
* method as the ExtendedLogger does not expose the enter/exit/catch calls with the FQCN parameter.
*
- * An implementation note: while Kotlin's delegation capabilities would normally allow this implementation to be
- * significantly less verbose by automatically delegating most methods to the ExtendedLogger delegate, this
- * would break location-awareness, since the ExtendedLogger delegate assumes its own FQCN is the root of the
- * logging stack. We therefore explicitly delegate to the ExtendedLogger.logIfEnabled method, passing in our own
- * FQCN for appropriate location awareness.
+ * Lastly, the ExtendedLogger delegate is available if the underlying Log4j Logger is needed for some reason.
+ * Access it via the `delegate` property.
*
- * TODO: The ExtendedLogger interface does not yet have support for trace entry and exit with FQCN specification.
+ * TODO: The ExtendedLogger delegate does not yet have support for trace entry and exit with FQCN specification.
* Therefore, until the Log4j2 API is updated and then this code is updated to match, location awareness will not
* work for these calls.
*/
@Suppress("UNUSED", "MemberVisibilityCanBePrivate")
-class KotlinLogger(private val delegate: ExtendedLogger): Logger by delegate {
+class KotlinLogger(val delegate: ExtendedLogger) {
companion object {
val FQCN: String = KotlinLogger::class.java.name
- fun <T: Any?> (() -> T).asLog4jSupplier(): Supplier<T> = Supplier { invoke() }
- fun <T: Any?> (Array<out () -> T>).asLog4jSuppliers(): Array<Supplier<T>> = map { it.asLog4jSupplier() }.toTypedArray()
}
- override fun log(level: Level, marker: Marker?, msg: Message?) {
+ fun log(level: Level, marker: Marker?, msg: Message?) {
delegate.logIfEnabled(FQCN, level, marker, msg, null)
}
- override fun log(level: Level, marker: Marker?, msg: Message?, t: Throwable?) {
+ fun log(level: Level, marker: Marker?, msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, level, marker, msg, t)
}
- override fun log(level: Level, marker: Marker?, msg: CharSequence?) {
+ fun log(level: Level, marker: Marker?, msg: CharSequence?) {
delegate.logIfEnabled(FQCN, level, marker, msg, null)
}
- override fun log(level: Level, marker: Marker?, msg: CharSequence?, t: Throwable?) {
+ fun log(level: Level, marker: Marker?, msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, level, marker, msg, t)
}
- override fun log(level: Level, marker: Marker?, msg: Any?) {
+ fun log(level: Level, marker: Marker?, msg: Any?) {
delegate.logIfEnabled(FQCN, level, marker, msg, null)
}
- override fun log(level: Level, marker: Marker?, msg: String?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, null as Throwable?)
+ fun log(level: Level, marker: Marker?, msg: Any?, t: Throwable?) {
+ delegate.logIfEnabled(FQCN, level, marker, msg, t)
}
- override fun log(level: Level, marker: Marker?, msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, *params)
+ fun log(level: Level, marker: Marker?, msg: String?) {
+ delegate.logIfEnabled(FQCN, level, marker, msg, null as Throwable?)
}
- override fun log(level: Level, marker: Marker?, msg: String?, t: Throwable?) {
+ fun log(level: Level, marker: Marker?, msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, level, marker, msg, t)
}
- override fun log(level: Level, msg: Message?) {
+ fun log(level: Level, msg: Message?) {
delegate.logIfEnabled(FQCN, level, null, msg, null)
}
- override fun log(level: Level, msg: Message?, t: Throwable?) {
+ fun log(level: Level, msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, level, null, msg, t)
}
- override fun log(level: Level, msg: CharSequence?) {
+ fun log(level: Level, msg: CharSequence?) {
delegate.logIfEnabled(FQCN, level, null, msg, null)
}
- override fun log(level: Level, msg: CharSequence?, t: Throwable?) {
+ fun log(level: Level, msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, level, null, msg, t)
}
- override fun log(level: Level, msg: Any?) {
+ fun log(level: Level, msg: Any?) {
delegate.logIfEnabled(FQCN, level, null, msg, null)
}
- override fun log(level: Level, msg: Any?, t: Throwable?) {
+ fun log(level: Level, msg: Any?, t: Throwable?) {
delegate.logIfEnabled(FQCN, level, null, msg, t)
}
- override fun log(level: Level, msg: String?) {
+ fun log(level: Level, msg: String?) {
delegate.logIfEnabled(FQCN, level, null, msg, null as Throwable?)
}
- override fun log(level: Level, msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, *params)
- }
-
- override fun log(level: Level, msg: String?, t: Throwable?) {
+ fun log(level: Level, msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, level, null, msg, t)
}
- override fun log(level: Level, msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, level, null, msgSupplier, null)
- }
-
fun log(level: Level, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, level, null, supplier.asLog4jSupplier(), null)
}
- override fun log(level: Level, msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, level, null, msgSupplier, t)
- }
-
fun log(level: Level, t: Throwable, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, level, null, supplier.asLog4jSupplier(), t)
}
- override fun log(level: Level, marker: Marker?, msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, level, marker, msgSupplier, null)
- }
-
fun log(level: Level, marker: Marker?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, level, marker, supplier.asLog4jSupplier(), null)
}
- override fun log(level: Level, marker: Marker?, msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, *paramSuppliers)
- }
-
- fun log(level: Level, marker: Marker?, msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- override fun log(level: Level, marker: Marker?, msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, level, marker, msgSupplier, t)
- }
-
fun log(level: Level, marker: Marker?, t: Throwable?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, level, marker, supplier.asLog4jSupplier(), t)
}
- override fun log(level: Level, msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, level, null, msg, *paramSuppliers)
- }
-
- fun log(level: Level, msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.trace(Marker, () -> Any?>)"))
- override fun log(level: Level, marker: Marker?, msgSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, level, marker, msgSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.trace(Marker, Throwable, () -> Any?>)"))
- override fun log(level: Level, marker: Marker?, msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, level, marker, msgSupplier, t)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.trace(() -> Any?>)"))
- override fun log(level: Level, messageSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, level, null, messageSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.trace(Throwable, () -> Any?>)"))
- override fun log(level: Level, msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, level, null, msgSupplier, t)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0, p1)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0, p2, p2)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0, p1, p2, p3)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0, p1, p2, p3, p4)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun log(level: Level, marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun log(level: Level, marker: Marker?, msg: Any?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, level, marker, msg, t)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0, p1)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0, p1, p2)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0, p1, p2, p3)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0, p1, p2, p3, p4)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun log(level: Level, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, level, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun trace(marker: Marker?, msg: Message?) {
+ fun trace(marker: Marker?, msg: Message?) {
delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, null)
}
- override fun trace(marker: Marker?, msg: Message?, t: Throwable?) {
+ fun trace(marker: Marker?, msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, t)
}
- override fun trace(marker: Marker?, msg: CharSequence?) {
+ fun trace(marker: Marker?, msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, null)
}
- override fun trace(marker: Marker?, msg: CharSequence?, t: Throwable?) {
+ fun trace(marker: Marker?, msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, t)
}
- override fun trace(marker: Marker?, msg: Any?) {
+ fun trace(marker: Marker?, msg: Any?) {
delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, null)
}
- override fun trace(marker: Marker?, msg: String?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, null as Throwable?)
+ fun trace(marker: Marker?, msg: Any?, t: Throwable?) {
+ delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, t)
}
- override fun trace(marker: Marker?, msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, *params)
+ fun trace(marker: Marker?, msg: String?) {
+ delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, null as Throwable?)
}
- override fun trace(marker: Marker?, msg: String?, t: Throwable?) {
+ fun trace(marker: Marker?, msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, t)
}
- override fun trace(msg: Message?) {
+ fun trace(msg: Message?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, null)
}
- override fun trace(msg: Message?, t: Throwable?) {
+ fun trace(msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, t)
}
- override fun trace(msg: CharSequence?) {
+ fun trace(msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, null)
}
- override fun trace(msg: CharSequence?, t: Throwable?) {
+ fun trace(msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, t)
}
- override fun trace(msg: Any?) {
+ fun trace(msg: Any?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, null)
}
- override fun trace(msg: Any?, t: Throwable?) {
+ fun trace(msg: Any?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, t)
}
- override fun trace(msg: String?) {
+ fun trace(msg: String?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, null as Throwable?)
}
- override fun trace(msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, *params)
- }
-
- override fun trace(msg: String?, t: Throwable?) {
+ fun trace(msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, t)
}
- override fun trace(msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msgSupplier, null)
- }
-
fun trace(supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, supplier.asLog4jSupplier(), null)
}
- override fun trace(msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msgSupplier, t)
- }
-
fun trace(t: Throwable, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.TRACE, null, supplier.asLog4jSupplier(), t)
}
- override fun trace(marker: Marker?, msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msgSupplier, null)
- }
-
fun trace(marker: Marker?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.TRACE, marker, supplier.asLog4jSupplier(), null)
}
- override fun trace(marker: Marker?, msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, *paramSuppliers)
- }
-
- fun trace(marker: Marker?, msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- override fun trace(marker: Marker?, msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msgSupplier, t)
- }
-
fun trace(marker: Marker?, t: Throwable?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.TRACE, marker, supplier.asLog4jSupplier(), t)
}
- override fun trace(msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, *paramSuppliers)
- }
-
- fun trace(msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.trace(Marker, () -> Any?>)"))
- override fun trace(marker: Marker?, msgSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msgSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.trace(Marker, Throwable, () -> Any?>)"))
- override fun trace(marker: Marker?, msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msgSupplier, t)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.trace(() -> Any?>)"))
- override fun trace(messageSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, messageSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.trace(Throwable, () -> Any?>)"))
- override fun trace(msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msgSupplier, t)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0, p1)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0, p2, p2)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0, p1, p2, p3)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0, p1, p2, p3, p4)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun trace(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun trace(marker: Marker?, msg: Any?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, marker, msg, t)
- }
-
- override fun trace(msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0)
- }
-
- override fun trace(msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0, p1)
- }
-
- override fun trace(msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0, p1, p2)
- }
-
- override fun trace(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0, p1, p2, p3)
- }
-
- override fun trace(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0, p1, p2, p3, p4)
- }
-
- override fun trace(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun trace(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun trace(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun trace(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun trace(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.TRACE, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
// TODO entry with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun traceEntry(): EntryMessage {
+ // TODO kotlin-ize these
+ fun traceEntry(): EntryMessage {
return delegate.traceEntry()
}
// TODO entry with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun traceEntry(format: String?, vararg params: Any?): EntryMessage {
+ fun traceEntry(format: String?, vararg params: Any?): EntryMessage {
return delegate.traceEntry(format, *params)
}
- // TODO entry with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun traceEntry(vararg paramSuppliers: Supplier<*>?): EntryMessage {
- return delegate.traceEntry(*paramSuppliers)
- }
-
fun traceEntry(vararg paramSuppliers: () -> Any?): EntryMessage {
return delegate.traceEntry(*paramSuppliers.asLog4jSuppliers())
}
// TODO entry with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun traceEntry(format: String?, vararg paramSuppliers: Supplier<*>?): EntryMessage {
- return delegate.traceEntry(format, *paramSuppliers)
- }
-
fun traceEntry(format: String?, vararg paramSuppliers: () -> Any?): EntryMessage {
return delegate.traceEntry(format, *paramSuppliers.asLog4jSuppliers())
}
// TODO entry with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun traceEntry(message: Message?): EntryMessage {
+ fun traceEntry(message: Message?): EntryMessage {
return delegate.traceEntry(message)
}
// TODO exit with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun traceExit() {
+ fun traceExit() {
delegate.traceExit()
}
// TODO exit with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun <R : Any?> traceExit(format: String?, result: R): R {
+ fun <R : Any?> traceExit(format: String?, result: R): R {
return delegate.traceExit(format, result)
}
// TODO exit with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun <R : Any?> traceExit(message: Message?, result: R): R {
+ fun <R : Any?> traceExit(message: Message?, result: R): R {
return delegate.traceExit(message, result)
}
// TODO exit with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun traceExit(message: EntryMessage?) {
+ fun traceExit(message: EntryMessage?) {
delegate.traceExit(message)
}
// TODO exit with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun <R : Any?> traceExit(result: R): R {
+ fun <R : Any?> traceExit(result: R): R {
return delegate.traceExit(result)
}
// TODO exit with fqcn is not part of the ExtendedLogger interface, location-awareness will be broken
- override fun <R : Any?> traceExit(message: EntryMessage?, result: R): R {
+ fun <R : Any?> traceExit(message: EntryMessage?, result: R): R {
return delegate.traceExit(message, result)
}
@@ -592,1108 +291,409 @@ class KotlinLogger(private val delegate: ExtendedLogger): Logger by delegate {
}
result
} catch (e: Throwable) {
- catching(e)
+ delegate.catching(e)
throw e
}
}
- override fun debug(marker: Marker?, msg: Message?) {
+ fun debug(marker: Marker?, msg: Message?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, null)
}
- override fun debug(marker: Marker?, msg: Message?, t: Throwable?) {
+ fun debug(marker: Marker?, msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, t)
}
- override fun debug(marker: Marker?, msg: CharSequence?) {
+ fun debug(marker: Marker?, msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, null)
}
- override fun debug(marker: Marker?, msg: CharSequence?, t: Throwable?) {
+ fun debug(marker: Marker?, msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, t)
}
- override fun debug(marker: Marker?, msg: Any?) {
+ fun debug(marker: Marker?, msg: Any?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, null)
}
- override fun debug(marker: Marker?, msg: String?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, null as Throwable?)
+ fun debug(marker: Marker?, msg: Any?, t: Throwable?) {
+ delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, t)
}
- override fun debug(marker: Marker?, msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, *params)
+ fun debug(marker: Marker?, msg: String?) {
+ delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, null as Throwable?)
}
- override fun debug(marker: Marker?, msg: String?, t: Throwable?) {
+ fun debug(marker: Marker?, msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, t)
}
- override fun debug(msg: Message?) {
+ fun debug(msg: Message?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, null)
}
- override fun debug(msg: Message?, t: Throwable?) {
+ fun debug(msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, t)
}
- override fun debug(msg: CharSequence?) {
+ fun debug(msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, null)
}
- override fun debug(msg: CharSequence?, t: Throwable?) {
+ fun debug(msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, t)
}
- override fun debug(msg: Any?) {
+ fun debug(msg: Any?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, null)
}
- override fun debug(msg: Any?, t: Throwable?) {
+ fun debug(msg: Any?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, t)
}
- override fun debug(msg: String?) {
+ fun debug(msg: String?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, null as Throwable?)
}
- override fun debug(msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, *params)
- }
-
- override fun debug(msg: String?, t: Throwable?) {
+ fun debug(msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, t)
}
- override fun debug(msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msgSupplier, null)
- }
-
fun debug(supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, supplier.asLog4jSupplier(), null)
}
- override fun debug(msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msgSupplier, t)
- }
-
fun debug(t: Throwable, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, null, supplier.asLog4jSupplier(), t)
}
- override fun debug(marker: Marker?, msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msgSupplier, null)
- }
-
fun debug(marker: Marker?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, marker, supplier.asLog4jSupplier(), null)
}
- override fun debug(marker: Marker?, msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, *paramSuppliers)
- }
-
- fun debug(marker: Marker?, msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- override fun debug(marker: Marker?, msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msgSupplier, t)
- }
-
fun debug(marker: Marker?, t: Throwable?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.DEBUG, marker, supplier.asLog4jSupplier(), t)
}
- override fun debug(msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, *paramSuppliers)
- }
-
- fun debug(msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.debug(Marker, () -> Any?>)"))
- override fun debug(marker: Marker?, msgSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msgSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.debug(Marker, Throwable, () -> Any?>)"))
- override fun debug(marker: Marker?, msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msgSupplier, t)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.debug(() -> Any?>)"))
- override fun debug(messageSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, messageSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.debug(Throwable, () -> Any?>)"))
- override fun debug(msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msgSupplier, t)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0, p1)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0, p2, p2)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0, p1, p2, p3)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0, p1, p2, p3, p4)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun debug(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun debug(marker: Marker?, msg: Any?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, marker, msg, t)
- }
-
- override fun debug(msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0)
- }
-
- override fun debug(msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0, p1)
- }
-
- override fun debug(msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0, p1, p2)
- }
-
- override fun debug(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0, p1, p2, p3)
- }
-
- override fun debug(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0, p1, p2, p3, p4)
- }
-
- override fun debug(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun debug(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun debug(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun debug(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun debug(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.DEBUG, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun info(marker: Marker?, msg: Message?) {
+ fun info(marker: Marker?, msg: Message?) {
delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, null)
}
- override fun info(marker: Marker?, msg: Message?, t: Throwable?) {
+ fun info(marker: Marker?, msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, t)
}
- override fun info(marker: Marker?, msg: CharSequence?) {
+ fun info(marker: Marker?, msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, null)
}
- override fun info(marker: Marker?, msg: CharSequence?, t: Throwable?) {
+ fun info(marker: Marker?, msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, t)
}
- override fun info(marker: Marker?, msg: Any?) {
+ fun info(marker: Marker?, msg: Any?) {
delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, null)
}
- override fun info(marker: Marker?, msg: String?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, null as Throwable?)
+ fun info(marker: Marker?, msg: Any?, t: Throwable?) {
+ delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, t)
}
- override fun info(marker: Marker?, msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, *params)
+ fun info(marker: Marker?, msg: String?) {
+ delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, null as Throwable?)
}
- override fun info(marker: Marker?, msg: String?, t: Throwable?) {
+ fun info(marker: Marker?, msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, t)
}
- override fun info(msg: Message?) {
+ fun info(msg: Message?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, msg, null)
}
- override fun info(msg: Message?, t: Throwable?) {
+ fun info(msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, msg, t)
}
- override fun info(msg: CharSequence?) {
+ fun info(msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, msg, null)
}
- override fun info(msg: CharSequence?, t: Throwable?) {
+ fun info(msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, msg, t)
}
- override fun info(msg: Any?) {
+ fun info(msg: Any?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, msg, null)
}
- override fun info(msg: Any?, t: Throwable?) {
+ fun info(msg: Any?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, msg, t)
}
- override fun info(msg: String?) {
+ fun info(msg: String?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, msg, null as Throwable?)
}
- override fun info(msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, *params)
- }
-
- override fun info(msg: String?, t: Throwable?) {
+ fun info(msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, msg, t)
}
- override fun info(msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msgSupplier, null)
- }
-
fun info(supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, supplier.asLog4jSupplier(), null)
}
- override fun info(msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msgSupplier, t)
- }
-
fun info(t: Throwable, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.INFO, null, supplier.asLog4jSupplier(), t)
}
- override fun info(marker: Marker?, msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msgSupplier, null)
- }
-
fun info(marker: Marker?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.INFO, marker, supplier.asLog4jSupplier(), null)
}
- override fun info(marker: Marker?, msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, *paramSuppliers)
- }
-
- fun info(marker: Marker?, msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- override fun info(marker: Marker?, msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msgSupplier, t)
- }
-
fun info(marker: Marker?, t: Throwable?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.INFO, marker, supplier.asLog4jSupplier(), t)
}
- override fun info(msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, *paramSuppliers)
- }
-
- fun info(msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.info(Marker, () -> Any?>)"))
- override fun info(marker: Marker?, msgSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msgSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.info(Marker, Throwable, () -> Any?>)"))
- override fun info(marker: Marker?, msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msgSupplier, t)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.info(() -> Any?>)"))
- override fun info(messageSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, messageSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.info(Throwable, () -> Any?>)"))
- override fun info(msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msgSupplier, t)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0, p1)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0, p2, p2)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0, p1, p2, p3)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0, p1, p2, p3, p4)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun info(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun info(marker: Marker?, msg: Any?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.INFO, marker, msg, t)
- }
-
- override fun info(msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0)
- }
-
- override fun info(msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0, p1)
- }
-
- override fun info(msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0, p1, p2)
- }
-
- override fun info(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0, p1, p2, p3)
- }
-
- override fun info(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0, p1, p2, p3, p4)
- }
-
- override fun info(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun info(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun info(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun info(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun info(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.INFO, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun warn(marker: Marker?, msg: Message?) {
+ fun warn(marker: Marker?, msg: Message?) {
delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, null)
}
- override fun warn(marker: Marker?, msg: Message?, t: Throwable?) {
+ fun warn(marker: Marker?, msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, t)
}
- override fun warn(marker: Marker?, msg: CharSequence?) {
+ fun warn(marker: Marker?, msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, null)
}
- override fun warn(marker: Marker?, msg: CharSequence?, t: Throwable?) {
+ fun warn(marker: Marker?, msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, t)
}
- override fun warn(marker: Marker?, msg: Any?) {
+ fun warn(marker: Marker?, msg: Any?) {
delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, null)
}
- override fun warn(marker: Marker?, msg: String?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, null as Throwable?)
+ fun warn(marker: Marker?, msg: Any?, t: Throwable?) {
+ delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, t)
}
- override fun warn(marker: Marker?, msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, *params)
+ fun warn(marker: Marker?, msg: String?) {
+ delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, null as Throwable?)
}
- override fun warn(marker: Marker?, msg: String?, t: Throwable?) {
+ fun warn(marker: Marker?, msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, t)
}
- override fun warn(msg: Message?) {
+ fun warn(msg: Message?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, msg, null)
}
- override fun warn(msg: Message?, t: Throwable?) {
+ fun warn(msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, msg, t)
}
- override fun warn(msg: CharSequence?) {
+ fun warn(msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, msg, null)
}
- override fun warn(msg: CharSequence?, t: Throwable?) {
+ fun warn(msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, msg, t)
}
- override fun warn(msg: Any?) {
+ fun warn(msg: Any?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, msg, null)
}
- override fun warn(msg: Any?, t: Throwable?) {
+ fun warn(msg: Any?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, msg, t)
}
- override fun warn(msg: String?) {
+ fun warn(msg: String?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, msg, null as Throwable?)
}
- override fun warn(msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, *params)
- }
-
- override fun warn(msg: String?, t: Throwable?) {
+ fun warn(msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, msg, t)
}
- override fun warn(msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msgSupplier, null)
- }
-
fun warn(supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, supplier.asLog4jSupplier(), null)
}
- override fun warn(msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msgSupplier, t)
- }
-
fun warn(t: Throwable, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.WARN, null, supplier.asLog4jSupplier(), t)
}
- override fun warn(marker: Marker?, msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msgSupplier, null)
- }
-
fun warn(marker: Marker?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.WARN, marker, supplier.asLog4jSupplier(), null)
}
- override fun warn(marker: Marker?, msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, *paramSuppliers)
- }
-
- fun warn(marker: Marker?, msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- override fun warn(marker: Marker?, msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msgSupplier, t)
- }
-
fun warn(marker: Marker?, t: Throwable?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.WARN, marker, supplier.asLog4jSupplier(), t)
}
- override fun warn(msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, *paramSuppliers)
- }
-
- fun warn(msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.warn(Marker, () -> Any?>)"))
- override fun warn(marker: Marker?, msgSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msgSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.warn(Marker, Throwable, () -> Any?>)"))
- override fun warn(marker: Marker?, msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msgSupplier, t)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.warn(() -> Any?>)"))
- override fun warn(messageSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, messageSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.warn(Throwable, () -> Any?>)"))
- override fun warn(msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msgSupplier, t)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0, p1)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0, p2, p2)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0, p1, p2, p3)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0, p1, p2, p3, p4)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun warn(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun warn(marker: Marker?, msg: Any?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.WARN, marker, msg, t)
- }
-
- override fun warn(msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0)
- }
-
- override fun warn(msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0, p1)
- }
-
- override fun warn(msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0, p1, p2)
- }
-
- override fun warn(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0, p1, p2, p3)
- }
-
- override fun warn(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0, p1, p2, p3, p4)
- }
-
- override fun warn(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun warn(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun warn(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun warn(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun warn(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.WARN, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun error(marker: Marker?, msg: Message?) {
+ fun error(marker: Marker?, msg: Message?) {
delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, null)
}
- override fun error(marker: Marker?, msg: Message?, t: Throwable?) {
+ fun error(marker: Marker?, msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, t)
}
- override fun error(marker: Marker?, msg: CharSequence?) {
+ fun error(marker: Marker?, msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, null)
}
- override fun error(marker: Marker?, msg: CharSequence?, t: Throwable?) {
+ fun error(marker: Marker?, msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, t)
}
- override fun error(marker: Marker?, msg: Any?) {
+ fun error(marker: Marker?, msg: Any?) {
delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, null)
}
- override fun error(marker: Marker?, msg: String?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, null as Throwable?)
+ fun error(marker: Marker?, msg: Any?, t: Throwable?) {
+ delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, t)
}
- override fun error(marker: Marker?, msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, *params)
+ fun error(marker: Marker?, msg: String?) {
+ delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, null as Throwable?)
}
- override fun error(marker: Marker?, msg: String?, t: Throwable?) {
+ fun error(marker: Marker?, msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, t)
}
- override fun error(msg: Message?) {
+ fun error(msg: Message?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, null)
}
- override fun error(msg: Message?, t: Throwable?) {
+ fun error(msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, t)
}
- override fun error(msg: CharSequence?) {
+ fun error(msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, null)
}
- override fun error(msg: CharSequence?, t: Throwable?) {
+ fun error(msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, t)
}
- override fun error(msg: Any?) {
+ fun error(msg: Any?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, null)
}
- override fun error(msg: Any?, t: Throwable?) {
+ fun error(msg: Any?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, t)
}
- override fun error(msg: String?) {
+ fun error(msg: String?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, null as Throwable?)
}
- override fun error(msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, *params)
- }
-
- override fun error(msg: String?, t: Throwable?) {
+ fun error(msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, t)
}
- override fun error(msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msgSupplier, null)
- }
-
fun error(supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, supplier.asLog4jSupplier(), null)
}
- override fun error(msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msgSupplier, t)
- }
-
fun error(t: Throwable, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.ERROR, null, supplier.asLog4jSupplier(), t)
}
- override fun error(marker: Marker?, msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msgSupplier, null)
- }
-
fun error(marker: Marker?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.ERROR, marker, supplier.asLog4jSupplier(), null)
}
- override fun error(marker: Marker?, msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, *paramSuppliers)
- }
-
- fun error(marker: Marker?, msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- override fun error(marker: Marker?, msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msgSupplier, t)
- }
-
fun error(marker: Marker?, t: Throwable?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.ERROR, marker, supplier.asLog4jSupplier(), t)
}
- override fun error(msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, *paramSuppliers)
- }
-
- fun error(msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.error(Marker, () -> Any?>)"))
- override fun error(marker: Marker?, msgSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msgSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.error(Marker, Throwable, () -> Any?>)"))
- override fun error(marker: Marker?, msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msgSupplier, t)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.error(() -> Any?>)"))
- override fun error(messageSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, messageSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.error(Throwable, () -> Any?>)"))
- override fun error(msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msgSupplier, t)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0, p1)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0, p2, p2)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0, p1, p2, p3)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0, p1, p2, p3, p4)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun error(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun error(marker: Marker?, msg: Any?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, marker, msg, t)
- }
-
- override fun error(msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0)
- }
-
- override fun error(msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0, p1)
- }
-
- override fun error(msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0, p1, p2)
- }
-
- override fun error(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0, p1, p2, p3)
- }
-
- override fun error(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0, p1, p2, p3, p4)
- }
-
- override fun error(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun error(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun error(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun error(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun error(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.ERROR, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun fatal(marker: Marker?, msg: Message?) {
+ fun fatal(marker: Marker?, msg: Message?) {
delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, null)
}
- override fun fatal(marker: Marker?, msg: Message?, t: Throwable?) {
+ fun fatal(marker: Marker?, msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, t)
}
- override fun fatal(marker: Marker?, msg: CharSequence?) {
+ fun fatal(marker: Marker?, msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, null)
}
- override fun fatal(marker: Marker?, msg: CharSequence?, t: Throwable?) {
+ fun fatal(marker: Marker?, msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, t)
}
- override fun fatal(marker: Marker?, msg: Any?) {
+ fun fatal(marker: Marker?, msg: Any?) {
delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, null)
}
- override fun fatal(marker: Marker?, msg: String?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, null as Throwable?)
+ fun fatal(marker: Marker?, msg: Any?, t: Throwable?) {
+ delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, t)
}
- override fun fatal(marker: Marker?, msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, *params)
+ fun fatal(marker: Marker?, msg: String?) {
+ delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, null as Throwable?)
}
- override fun fatal(marker: Marker?, msg: String?, t: Throwable?) {
+ fun fatal(marker: Marker?, msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, t)
}
- override fun fatal(msg: Message?) {
+ fun fatal(msg: Message?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, null)
}
- override fun fatal(msg: Message?, t: Throwable?) {
+ fun fatal(msg: Message?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, t)
}
- override fun fatal(msg: CharSequence?) {
+ fun fatal(msg: CharSequence?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, null)
}
- override fun fatal(msg: CharSequence?, t: Throwable?) {
+ fun fatal(msg: CharSequence?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, t)
}
- override fun fatal(msg: Any?) {
+ fun fatal(msg: Any?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, null)
}
- override fun fatal(msg: Any?, t: Throwable?) {
+ fun fatal(msg: Any?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, t)
}
- override fun fatal(msg: String?) {
+ fun fatal(msg: String?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, null as Throwable?)
}
- override fun fatal(msg: String?, vararg params: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, *params)
- }
-
- override fun fatal(msg: String?, t: Throwable?) {
+ fun fatal(msg: String?, t: Throwable?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, t)
}
- override fun fatal(msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msgSupplier, null)
- }
-
fun fatal(supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, supplier.asLog4jSupplier(), null)
}
- override fun fatal(msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msgSupplier, t)
- }
-
fun fatal(t: Throwable, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.FATAL, null, supplier.asLog4jSupplier(), t)
}
- override fun fatal(marker: Marker?, msgSupplier: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msgSupplier, null)
- }
-
fun fatal(marker: Marker?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.FATAL, marker, supplier.asLog4jSupplier(), null)
}
- override fun fatal(marker: Marker?, msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, *paramSuppliers)
- }
-
- fun fatal(marker: Marker?, msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- override fun fatal(marker: Marker?, msgSupplier: Supplier<*>?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msgSupplier, t)
- }
-
fun fatal(marker: Marker?, t: Throwable?, supplier: () -> Any?) {
delegate.logIfEnabled(FQCN, Level.FATAL, marker, supplier.asLog4jSupplier(), t)
}
- override fun fatal(msg: String?, vararg paramSuppliers: Supplier<*>?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, *paramSuppliers)
- }
-
- fun fatal(msg: String?, vararg paramSuppliers: () -> Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, *paramSuppliers.asLog4jSuppliers())
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.fatal(Marker, () -> Any?>)"))
- override fun fatal(marker: Marker?, msgSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msgSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.fatal(Marker, Throwable, () -> Any?>)"))
- override fun fatal(marker: Marker?, msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msgSupplier, t)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.fatal(() -> Any?>)"))
- override fun fatal(messageSupplier: MessageSupplier?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, messageSupplier, null)
- }
-
- @Deprecated("Use lambda methods.", ReplaceWith("delegate.fatal(Throwable, () -> Any?>)"))
- override fun fatal(msgSupplier: MessageSupplier?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msgSupplier, t)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0, p1)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0, p2, p2)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0, p1, p2, p3)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0, p1, p2, p3, p4)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun fatal(marker: Marker?, msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
-
- override fun fatal(marker: Marker?, msg: Any?, t: Throwable?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, marker, msg, t)
- }
-
- override fun fatal(msg: String?, p0: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0)
- }
-
- override fun fatal(msg: String?, p0: Any?, p1: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0, p1)
- }
-
- override fun fatal(msg: String?, p0: Any?, p1: Any?, p2: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0, p1, p2)
- }
-
- override fun fatal(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0, p1, p2, p3)
- }
-
- override fun fatal(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0, p1, p2, p3, p4)
- }
-
- override fun fatal(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0, p1, p2, p3, p4, p5)
- }
-
- override fun fatal(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0, p1, p2, p3, p4, p5, p6)
- }
-
- override fun fatal(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0, p1, p2, p3, p4, p5, p6, p7)
- }
-
- override fun fatal(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8)
- }
-
- override fun fatal(msg: String?, p0: Any?, p1: Any?, p2: Any?, p3: Any?, p4: Any?, p5: Any?, p6: Any?, p7: Any?, p8: Any?, p9: Any?) {
- delegate.logIfEnabled(FQCN, Level.FATAL, null, msg, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- }
}
http://git-wip-us.apache.org/repos/asf/logging-log4j-kotlin/blob/f5b067f8/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/LoggingFactory.kt
----------------------------------------------------------------------
diff --git a/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/LoggingFactory.kt b/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/LoggingFactory.kt
index 0a8dde0..4824c4f 100644
--- a/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/LoggingFactory.kt
+++ b/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/LoggingFactory.kt
@@ -17,6 +17,7 @@
package org.apache.logging.log4j.kotlin
import org.apache.logging.log4j.LogManager
+import org.apache.logging.log4j.spi.ExtendedLogger
import kotlin.reflect.full.companionObject
/**
@@ -25,8 +26,22 @@ import kotlin.reflect.full.companionObject
@Suppress("unused")
inline fun <reified T : Any> T.logger() = loggerOf(T::class.java)
+/**
+ * Logger instantiation by function. Use: `val log = logger()`.
+ */
+@Suppress("unused")
+inline fun <reified T : Any> T.completeLogger() = completeLoggerOf(T::class.java)
+
+fun loggerDelegateOf(ofClass: Class<*>): ExtendedLogger {
+ return LogManager.getContext(ofClass.classLoader, false).getLogger(unwrapCompanionClass(ofClass).name)
+}
+
fun loggerOf(ofClass: Class<*>): KotlinLogger {
- return KotlinLogger(LogManager.getContext(ofClass.classLoader, false).getLogger(unwrapCompanionClass(ofClass).name))
+ return KotlinLogger(loggerDelegateOf(ofClass))
+}
+
+fun completeLoggerOf(ofClass: Class<*>): KotlinCompleteLogger {
+ return KotlinCompleteLogger(loggerDelegateOf(ofClass))
}
// unwrap companion class to enclosing class given a Java Class
http://git-wip-us.apache.org/repos/asf/logging-log4j-kotlin/blob/f5b067f8/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/Suppliers.kt
----------------------------------------------------------------------
diff --git a/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/Suppliers.kt b/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/Suppliers.kt
new file mode 100644
index 0000000..57bbf55
--- /dev/null
+++ b/log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/Suppliers.kt
@@ -0,0 +1,7 @@
+package org.apache.logging.log4j.kotlin
+
+import org.apache.logging.log4j.util.Supplier
+
+fun <T: Any?> (() -> T).asLog4jSupplier(): Supplier<T> = Supplier { invoke() }
+
+fun <T: Any?> (Array<out () -> T>).asLog4jSuppliers(): Array<Supplier<T>> = map { it.asLog4jSupplier() }.toTypedArray()