mirror of
https://github.com/corda/corda.git
synced 2025-04-07 19:34:41 +00:00
Minor: add a log.debug {} utility same as log.trace {} to do lazy message construction
This commit is contained in:
parent
2d40c7e6dc
commit
86267e880d
@ -13,9 +13,8 @@ import kotlin.reflect.KClass
|
||||
// logging at that level is enabled.
|
||||
inline fun <reified T : Any> loggerFor(): org.slf4j.Logger = LoggerFactory.getLogger(T::class.java)
|
||||
|
||||
inline fun org.slf4j.Logger.trace(msg: () -> String) {
|
||||
if (isTraceEnabled) trace(msg())
|
||||
}
|
||||
inline fun org.slf4j.Logger.trace(msg: () -> String) { if (isTraceEnabled) trace(msg()) }
|
||||
inline fun org.slf4j.Logger.debug(msg: () -> String) { if (isDebugEnabled) debug(msg()) }
|
||||
|
||||
/** A configuration helper that allows modifying the log level for specific loggers */
|
||||
object LogHelper {
|
||||
|
Loading…
x
Reference in New Issue
Block a user