Skip to content

Show every log the container produces in one window - #66

Merged
rangoDJ merged 3 commits into
mainfrom
feature/single-log-window
Oct 10, 2026
Merged

rangoDJ merged 3 commits into
mainfrom
feature/single-log-window

Conversation

@rangoDJ

@rangoDJ rangoDJ commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Fixes #65

What changed

  • connecthub-init (new entry point): sends the container's entire output — every s6 service, the web server, start-up — through s6-log into /var/log/connecthub/all (rotated, 5 × 4 MB, timestamped), then execs /init, which stays PID 1. s6-log's 1 action passes each line on first, so docker logs is unchanged. If the log folder can't be written it just runs /init.
  • s6-overlay's own catch-all logger (S6_LOGGING=1) was tried first in a test container on the current image: it doesn't start on this base, hence the wrapper.
  • Client output: the RDP/VNC/SSH client's output is written to the container output tagged [RDP]/[VNC]/[SSH] (it used to go only to an in-memory session buffer). nginx's error log goes to stderr.
  • Dashboard: the three tabs become one Logs window (last 2,000 lines, follows new lines while scrolled to the bottom) with a Filter box. Colours mark the session's client, ConnectHub's own messages, warnings and errors (including nginx's lowercase levels). One endpoint, GET /api/logs.
  • Removed the separate Selkies log pipe (svc-selkies-log, its producer link and run-script prelude) — redundant now. CLIPBOARD_DEBUG → SELKIES_DEBUG moves into connecthub-init.
  • README and compose updated.

Testing

  • pytest: 252 passed, 8 skipped. Client output is tagged and printed; RDP errors in it are still reported; the polling filter covers /api/logs.
  • Local dev server with a mixed log (Selkies, [RDP], server, xsettingsd, nginx): one window, no tabs; filtering on rdp shows only matching lines; classes as expected.
  • Container: being tested from a manual build of this branch in a throwaway container (results in a comment).

🤖 Generated with Claude Code

The dashboard split logs over three tabs, and the X server, audio, start-up
and nginx errors were in none of them. The new connecthub-init entry point
sends all container output through s6-log into a rotated file (passing every
line on, so docker logs is unchanged) and then runs /init. The session's
client and nginx's error log now write to that output too, and the
dashboard shows the file in one window with a text filter.

That replaces the separate Selkies log pipe (svc-selkies-log); the
CLIPBOARD_DEBUG switch for Selkies' debug log moves to the entry point.

Fixes #65

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rangoDJ

rangoDJ commented Oct 10, 2026

Copy link
Copy Markdown
Owner Author

Container test of sha-1c8c26a (this branch) in a throwaway container on the Docker host, no ports/volumes/GPU:

  • docker logs unchanged: LSIO start-up banner, init, Xvfb, xsettingsd, uvicorn and Selkies all present.
  • /var/log/connecthub/all/current holds the same lines from the very first start-up message, timestamped by s6-log; mode 644, so the web server can read it.
  • All services started normally with connecthub-init as the entry point (/init still PID 1 after exec).
    Container removed afterwards.

@rangoDJ
rangoDJ merged commit 45313f8 into main Oct 10, 2026
4 checks passed
@rangoDJ
rangoDJ deleted the feature/single-log-window branch October 10, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

One log window showing every log the container produces

1 participant