· 2 min read Posted by Kevin Schildhorn
Kermit 2.2.0 adds WasmWasi support and a new Coil3 extension
Kermit 2.2.0 has just been released! With the help of the community this new version includes WasmWasi support for kermit-core and kermit-test, plus updated targets for kermit-ktor(jvm, mingw, linux, and androidNative) and a new kermit-coil module for routing logs from coil into Kermit.
A note about WasmWasi Support
This version adds WasmWasi, or WebAssembly System Interface, support for kermit-core and kermit-test. At this time Ktor, Koin, Crashlytics, and Bugsnag do not support WasmWasi so we were unable to update modules that used those libraries.
Kermit-coil
A new module named Kermit-coil has been added to the library, which lets a Kermit logger receive logs from Coil 3 image loaders. To do this you can create a KermitCoilLogger which works like any other coil3.util.Logger.
setSingletonImageLoaderFactory { context ->
ImageLoader.Builder(context)
.logger(KermitCoilLogger(Logger.withTag("Kermit")))
.build()
}
The logger is also customizable by adding common Kermit configs as well as tag customization.
val config = loggerConfigInit(...)
val coilLogger = KermitCoilLogger(
config = config,
tag = "Images",
separator = ":",
)
coilLogger.minLevel = CoilLogger.Level.Debug
Tags for KermitCoilLogger are formatted as "${KermitTag}${Separator}${CoilTag}" (So by default the tag would be “Coil/RealImageLoader”). This config allows you to customize your tag, plus you can customize your log level for this logger. You can see the corresponding levels in the README.
Contributors
A huge thank you to the contributors of these changes!