{"repo":"saschpe/Log4K","free":true,"listed":false,"github":"https://github.com/saschpe/Log4K","clone":"git clone https://github.com/saschpe/Log4K.git","description":"Lightweight logging library for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments.","language":"Kotlin","stars":33,"topics":["kotlin","kotlin-multiplatform","kotlin-android","logging","kotlin-js","kotlin-jvm","kotlin-ios","gradle","ios","ios-library"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"Log4K Lightweight logging library for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments. - log4k : Base library, provides infrastructure and logging to the console or files with configurable rotation and retention policies. - log4k-slf4j : Integration with SLF4J Download Artifacts are published to [Maven Central][maven-central]: Usage Logging messages is straightforward, the Log object provides the usual functions you'd expect: Or, if you prefer: The log output includes the function name and line and pretty-prints exceptions on all supported platforms: I/Application.onCreate: Log4K rocks! Logging objects In case you want to log Any Kotlin class instance or object: The above example logs {Hello=World} with the tag SingletonMap with the log level Debug . Logging expensive results Sometimes, the log output involves a heavy computation that is not always necessary. For example, if the global log level is set to Info or above, the following text would not appear in any log output: However, the function veryHeavyStuff() will be executed regardless. To avoid this, use: Configuration (Android example) To only output messages with log-level info and above, you can configure the console logger in your Application class: Logging to a file By default, the library only logs to the current platform's console. Additionally or instead, add one or multiple file loggers: Custom logger (Android Crashlytics example) The library provides a cross-platform ConsoleLo","default_branch":null,"files":null,"tree":[],"storefront":"/r/saschpe","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/saschpe/Log4K/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}