Plugins
Colotok integration modules provide remote destinations, SLF4J bindings, and coroutine logging extensions. Add the modules required by your application alongside the core library.
Available modules
Module | Purpose | Platforms |
|---|---|---|
| Suspending logging calls and batched | JVM, Android, JS/Node, iOS Arm64, iOS Simulator Arm64, macOS Arm64 |
| Grafana Loki destination | Same targets as core |
| AWS CloudWatch Logs destination | JVM |
| SLF4J 1.7 binding | JVM |
| SLF4J 2.x binding | JVM |
See Official Plugins for configuration and usage examples.
Coroutine logging
Add the coroutine module to commonMain:
Call the logging extensions from a suspend function:
For an AsyncProvider, the call waits for channel capacity. A regular Provider uses its non-blocking write() implementation.
Choose the logging call according to the enqueue behavior you need:
atInfoAsync { print(...) }provides a suspending block with non-blockingprint()calls. Eachprint()usesProvider.write(), including forAsyncProvider.Message calls such as
infoAsync(message)andatAsync(level, message)wait for channel capacity when the destination is anAsyncProvider.
Custom integrations
Subclass Provider to process individual records, or AsyncProvider to publish batches. Both classes provide queue processing, flush, and shutdown behavior. ProviderConfig defines level, formatter, and metrics settings.
See Create Plugin for a custom provider example and Custom Formatter for formatting options.