ComposeViewer
Info
If you use compose in your app you should use this viewer - it allows you to show log files directly inside your app.
val showLogViewer = rememberSaveable {
mutableStateOf(false)
}
LumberjackDialog(
visible = showLogViewer,
title = "Logs",
setup = <a file logging setup>,
// optional
style = LumberjackViewDefaults.style(),
darkTheme = isSystemInDarkTheme(),
mail = null
)
Alternatively you can always embed the view directly like following:
LumberjackView(
setup = <a file logging setup>,
// optional
modifier = Modifier,
file = rememberLogFile(),
data = rememberLogFileData(),
state = rememberLazyListState(),
darkTheme = isSystemInDarkTheme(),
style = LumberjackViewDefaults.style(),
useScrollableLines = remember { mutableStateOf(false) }
)
Tip
You can also embed the whole dialog "content view" inside a layout if you want to also show the menu and use it's features
LumberjackDialogContent(
title = "Logs",
setup = <a file logging setup>,
// optional
style= LumberjackViewDefaults.style(),
darkTheme = isSystemInDarkTheme(),
mail = null
)
Compose Viewer | |
---|---|