mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Add setting to increase logging verbosity (#354)
Adds a toggle to increase the verbosity of the app logs for release/production builds Most users won't need to use this, but it can be helpful when [gathering app logs](https://github.com/damontecres/Wholphin/wiki/Gathering-app-logs) to report an issue.
This commit is contained in:
parent
a320875af6
commit
eca3268a7d
6 changed files with 65 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ import com.github.damontecres.wholphin.ui.preferences.ConditionalPreferences
|
|||
import com.github.damontecres.wholphin.ui.preferences.PreferenceGroup
|
||||
import com.github.damontecres.wholphin.ui.preferences.PreferenceScreenOption
|
||||
import com.github.damontecres.wholphin.ui.preferences.PreferenceValidation
|
||||
import com.github.damontecres.wholphin.util.DebugLogTree
|
||||
import kotlin.time.Duration.Companion.hours
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
import kotlin.time.Duration.Companion.minutes
|
||||
|
|
@ -699,6 +700,19 @@ sealed interface AppPreference<T> {
|
|||
},
|
||||
summary = R.string.disable_if_crash,
|
||||
)
|
||||
|
||||
val DebugLogging =
|
||||
AppSwitchPreference(
|
||||
title = R.string.verbose_logging,
|
||||
defaultValue = false,
|
||||
getter = { DebugLogTree.INSTANCE.enabled },
|
||||
setter = { prefs, value ->
|
||||
DebugLogTree.INSTANCE.enabled = value
|
||||
prefs.update { debugLogging = value }
|
||||
},
|
||||
summaryOn = R.string.enabled,
|
||||
summaryOff = R.string.disabled,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -837,6 +851,7 @@ val advancedPreferences =
|
|||
listOf(
|
||||
AppPreference.SendAppLogs,
|
||||
AppPreference.SendCrashReports,
|
||||
AppPreference.DebugLogging,
|
||||
AppPreference.ClearImageCache,
|
||||
AppPreference.OssLicenseInfo,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ class AppPreferencesSerializer
|
|||
.apply {
|
||||
updateUrl = AppPreference.UpdateUrl.defaultValue
|
||||
autoCheckForUpdates = AppPreference.AutoCheckForUpdates.defaultValue
|
||||
sendCrashReports = AppPreference.SendCrashReports.defaultValue
|
||||
debugLogging = AppPreference.DebugLogging.defaultValue
|
||||
|
||||
playbackPreferences =
|
||||
PlaybackPreferences
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue