Logger
Android actual implementation of Logger.
Delegates to timber.log.Timber. Timber must be planted in your Application.onCreate before the SDK is used — e.g. Timber.plant(Timber.DebugTree()).
Platform-agnostic logging abstraction for the MTN MOMO SDK.
Use this in commonMain code instead of importing platform-specific logging libraries. Each platform supplies its own actual implementation:
Android (
androidMain): delegates to timber.log.Timber, which must be planted in yourApplication.onCreate(e.g.Timber.plant(Timber.DebugTree())).JVM (
jvmMain): writes to standard output in the format{LEVEL}/{tag}: {message}.
Usage in commonMain:
Logger.d("MyClass", "debug message")
Logger.i("MyClass", "info message")
Logger.w("MyClass", "warning message")
Logger.e("MyClass", "error message", throwable)JVM actual implementation of Logger.
Writes to standard output in the format {LEVEL}/{tag}: {message}. For error logs, any supplied Throwable stack trace is printed via Throwable.printStackTrace.