logIfDebugEnabled

inline fun Logger.logIfDebugEnabled(category: String, message: () -> String)

Inlines a check for whether the Logger is currently logging at LogLevel.DEBUG, before evaluating the message, whilst avoiding an unnecessary anonymous class implementation.

This is equivalent to the following code.

if (logger.shouldLog(LogLevel.DEBUG) {
logger.debug(category, "some message")
}

It is therefore not recommended for use before the initial LogLevel has been set during sdk initialization