mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
docs(playback): correct the log-level claims guarding the diagnostic traces
Both comments described levels no variant actually uses. DEFAULT_LOG_LEVEL gives
debug builds INFO (not DEBUG) and release WARN (not ERROR), and the `benchmark`
build type counts as `isDebug`, so it gets INFO too rather than being the silent
release-like variant the text implied.
The practical consequence was the misleading part: both said a debug build is
enough to capture the trace. It is not — these are `Log.d`, which needs
`minLevel <= DEBUG`, so PlaybackDiag and VideoQuality are silent in a stock
debug build and only appear once Amethyst.VERBOSE_LOGS is flipped to true.
RelayUsageListener already documents this correctly ("a debug build defaults to
LogLevel.INFO"); these two had drifted from it.
This commit is contained in:
@@ -22,9 +22,13 @@ package com.vitorpamplona.amethyst.service.playback
|
||||
|
||||
/**
|
||||
* Shared logcat tag for the playback diagnostic trace (source routing, player lifecycle, error
|
||||
* recovery, HLS liveness learning). Emitted with `Log.d`, so it appears only in a debug build
|
||||
* (`Log.minLevel = DEBUG`) and is silent in benchmark/release (`ERROR`). To capture a playback
|
||||
* investigation, install a debug build and run:
|
||||
* recovery, HLS liveness learning).
|
||||
*
|
||||
* Emitted with `Log.d`, which fires only while `Log.minLevel <= DEBUG`. No shipped variant is
|
||||
* there by default: [com.vitorpamplona.amethyst.Amethyst.DEFAULT_LOG_LEVEL] gives debug AND
|
||||
* benchmark builds `INFO` (the `benchmark` build type counts as `isDebug`) and release `WARN`, so
|
||||
* this trace is silent everywhere until `Amethyst.VERBOSE_LOGS` is flipped to true. To capture a
|
||||
* playback investigation, set that flag, install a debug build and run:
|
||||
*
|
||||
* ```
|
||||
* adb logcat -s PlaybackDiag
|
||||
|
||||
+5
-3
@@ -148,9 +148,11 @@ const val VIDEO_QUALITY_TAG = "VideoQuality"
|
||||
* Traces which rendition adaptive selection landed on, against the full ladder the manifest
|
||||
* offered.
|
||||
*
|
||||
* The listener is registered only when the trace can actually be emitted — debug builds set
|
||||
* `Log.minLevel = DEBUG` while benchmark/release set `ERROR` (see [PLAYBACK_DIAG_TAG]) — so the
|
||||
* release path keeps the "no listener per player" property that dropping the old selector bought.
|
||||
* The listener is registered only when the trace can actually be emitted. `Log.minLevel` is above
|
||||
* `DEBUG` in every variant by default — `INFO` for debug and benchmark builds, `WARN` for release
|
||||
* (see [PLAYBACK_DIAG_TAG]) — so this costs nothing until `Amethyst.VERBOSE_LOGS` is turned on,
|
||||
* and every build keeps the "no listener per player" property that dropping the old selector
|
||||
* bought.
|
||||
*/
|
||||
@Composable
|
||||
fun LogVideoQualitySelection(player: Player) {
|
||||
|
||||
Reference in New Issue
Block a user