StoreLogger

fun interface StoreLogger

Store logger can be invoked by any code in the store. log prints a message to the logger instance configured when building the store.

Functions

Link copied to clipboard
fun StoreLogger.debug(tag: String? = null, message: () -> String)

Shorthand for log with StoreLogLevel.Debug as the log level.

Link copied to clipboard
fun StoreLogger.error(tag: String? = null, message: () -> String)

Shorthand for log with StoreLogLevel.Error as the log level.

Link copied to clipboard
fun StoreLogger.info(tag: String? = null, message: () -> String)

Shorthand for log with StoreLogLevel.Info as the log level.

Link copied to clipboard
operator fun StoreLogger.invoke(e: Exception, level: StoreLogLevel = StoreLogLevel.Error, tag: String? = null)

Alias for StoreLogger.log that can log exceptions

operator fun StoreLogger.invoke(level: StoreLogLevel, tag: String? = null, message: () -> String)

Alias for StoreLogger.log with optional parameters

Link copied to clipboard
abstract fun log(level: StoreLogLevel, tag: String?, message: () -> String)

Print a message to the log.

Link copied to clipboard
fun StoreLogger.trace(tag: String? = null, message: () -> String)

Shorthand for log with StoreLogLevel.Trace as the log level.

Link copied to clipboard
fun StoreLogger.warn(tag: String? = null, message: () -> String)

Shorthand for log with StoreLogLevel.Warn as the log level.