chore(viewer): drop the always-on Qt debug logging from the image#2977
Merged
Conversation
- Remove `QT_LOGGING_RULES=*.debug=true` and `QT_QPA_DEBUG=1` from
docker/Dockerfile.viewer.j2 (plus the stale "Turn on debug logging
for now" comment + commented-out qt.qpa rule).
- These were a temporary bring-up aid ("for now", added in #2060,
Nov 2024) that was never reverted: unconditional, every board, in
production. On a real device that's ~20+ Qt scenegraph / sh-chunk
log lines per second, which saturates balena's 1000-line log buffer
in ~35 seconds and buries every application event (asset changes,
errors, crashes) — actively harmful to fleet observability.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Removes unconditional Qt debug logging environment variables from the viewer Docker image template to prevent production devices from flooding balena logs and obscuring application-level events.
Changes:
- Removed
QT_LOGGING_RULES=*.debug=trueandQT_QPA_DEBUG=1fromdocker/Dockerfile.viewer.j2. - Removed the stale “Turn on debug logging for now” comment and the commented-out
qt.qpa.*logging rule.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5 tasks
vpetersson
added a commit
that referenced
this pull request
Jun 2, 2026
) With debug logging removed (#2977), two pre-existing startup warnings became visible in the viewer logs. Both are fixed here: - migrate_legacy_paths.sh: `set -euo pipefail` + the bare `${USER}` in USER_HOME aborted the script when $USER is unset — which is the case in-container (DATA mode, via migrate_in_container_paths.sh). On a legacy (screenly→anthias) device that would skip the in-container migration entirely. Fall back to `id -un` so it resolves without tripping `set -u`. - AnthiasViewer: the MainWindow ctor called showFullScreen() AND main() called window->show(), showing the window twice. Under cage/wayland the double surface-commit tripped wlroots' "A configure is scheduled for an uninitialized xdg_surface" warning at startup. Show once, in main(), after construction. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5 tasks
vpetersson
added a commit
that referenced
this pull request
Jun 2, 2026
- CalVer (YYYY.0M.MICRO); still June 2026, micro 0 -> 1 - Ships the QML VideoOutput presentation path (#2975), the pi2/pi3 GStreamer HW video pipeline (#2972), and the x86 WLR_DRM_NO_ATOMIC display-freeze fix (#2978) - Also picks up Pi 4 eglfs rotation (#2971, #2973), the armv7 viewer spawn retry (#2969), the Writeback-connector headless guard (#2968), and viewer log cleanups (#2977, #2979) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issues Fixed
Fleet observability: the viewer image ships unconditional Qt debug logging, which floods the device logs and makes them unreadable.
Description
Drop
QT_LOGGING_RULES=*.debug=trueandQT_QPA_DEBUG=1fromdocker/Dockerfile.viewer.j2(and the stale "Turn on debug logging for now" comment + commented-outqt.qpa.*rule).These were a temporary bring-up aid ("for now", introduced in #2060, Nov 2024) that was never reverted — emitted unconditionally, on every board, in production. On a real device that's ~20+ Qt scenegraph /
sh-chunk lines per second, which saturates balena's 1000-line log buffer in ~35 seconds and buries every application-level event (asset changes, errors, crashes). Observed directly while validating a live pi4 (stormy-sun): the entire 800-line log window covered only ~35s and contained zero application events under the debug spam.No functional change to playback — only removes the firehose of
qt.*debug output, restoring usablebalena logs.Checklist
ENV-only change).ENVs only; no behavior change beyond log volume).ENVs removed for all boards.🤖 Generated with Claude Code