SLF4JLogger

actual class SLF4JLogger : Logger

Logger that forwards all log statements to SLF4J API.

SLF4J in turn allows using Logback or other implementations. This way, you can use the expressive logback.xml configuration and appender.

actual class SLF4JLogger : Logger
expect class SLF4JLogger : Logger

Logger that forwards all log statements to SLF4J API on JVM and Android platforms.

Suitable to replace saschpe.log4k.ConsoleLogger:

Log.loggers.clear()
Log.loggers += SLF4JLogger()

On JVM or Android, SLF4J is used for logging. On JS or Apple platforms, console logging is used internally.

actual class SLF4JLogger : Logger
actual class SLF4JLogger : Logger

Constructors

Link copied to clipboard
constructor()
constructor()
constructor()
constructor()

Properties

minimumLogLevel
Link copied to clipboard
var minimumLogLevel: Log.Level
var minimumLogLevel: Log.Level
var minimumLogLevel: Log.Level
var minimumLogLevel: Log.Level
var minimumLogLevel: Log.Level

Functions

log
Link copied to clipboard
fun log(level: Log.Level, tag: String, message: String?, throwable: Throwable?)
fun log(level: Log.Level, tag: String, message: String?, throwable: Throwable?)
fun log(level: Log.Level, tag: String, message: String?, throwable: Throwable?)
fun log(level: Log.Level, tag: String, message: String?, throwable: Throwable?)
fun log(level: Log.Level, tag: String, message: String?, throwable: Throwable?)