kotlin-logging integration for koin DI
Integrate kotlin-logging into koin DI
KLogger as koin logger
startKoin {
koinKLogger()
}
KLogger factory in koin DI
Set up
startKoin {
modules(koinKLoggingModule, )
}
Inject
class MyComponent : KoinComponent {
private val logger by injectKLogger()
}
- for KoinApplication or Koin instances
val logger by koinApp.injectKLogger {}
val logger by koinApp.injectKLogger("LOGGER_NAME")
val logger by koinApp.injectKLogger(clazz)
License
Copyright 2022 aviadmini
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.