Lumberjack - a customisable and extensible file/console logger (with optional Timber support)
Compose Viewer allows to enable/disable single scrollable line view
Added a clear icon to the compose viewer activity Compose Version: 2024.04.00
bugfix: lumberjack file logger daily setup did not delete the correct files in the last version
updated feedback manager dependency
New Features
BaseFileLoggerSetup
FileLoggerSetup.FileSize.create(...)
Migration
Change FileLoggerSetup.Daily(...)
to FileLoggerSetup.Daily.create(...)
feedback dependency updated - sharing files does work differently now and should work reliable
Feedback + Notification Module refactored - cleaner and more comprehensive interface
This new release has quite some changes:
Timber
anymore (but it still supports it!)L
class still is placed inside the same package BUT all other classes are notNEW
timber
, no slfj4
, no logback-android
) => this can save quite some app size...MIGRATION
Normally not much should be needed:
build.gradle
- check out the new readmeLumberjack
you need to adjust your imports because the console logger, file logger and the extensions have all been moved to their own modules with new package names => simply deleting the imports and let android studio auto import them again should solve thatimport com.michaelflisar.lumberjack.L
with import com.michaelflisar.lumberjack.core.L
(the core is new)Added log functions with manual levels:
fun log(priority: Int, t: Throwable, message: () -> String)
fun log(priority: Int, t: Throwable)
fun log(priority: Int, message: () -> String)
Very useful if you want to forward logs from another library inside a custom logger... e.g. like following:
// definition looks like following:
// var logger: ((level: Int, info: String, e: Exception?) -> Unit)? = null
MaterialDialog.logger = { level, info, exception ->
if (exception != null) {
L.tag("DIALOG-LOGS").log(level, exception) { info }
} else {
L.tag("DIALOG-LOGS").log(level) { info }
}
}
Full Changelog: https://github.com/MFlisar/Lumberjack/compare/5.2.9...5.3.0