Skip to content

fix(cli): daemon backend logs, serve timestamps, upgrade journal#181

Merged
xiami762 merged 2 commits into
mainfrom
fix/daemon-logs-upgrade-journal
Apr 24, 2026
Merged

fix(cli): daemon backend logs, serve timestamps, upgrade journal#181
xiami762 merged 2 commits into
mainfrom
fix/daemon-logs-upgrade-journal

Conversation

@xiami762

@xiami762 xiami762 commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • backend.log: Uvicorn access/error lines now include wall-clock timestamps via a custom log_config in flocks serve.
  • flocks start: Backend child runs with PYTHONUNBUFFERED=1; on health-check failure, the last ~40 lines of backend.log / webui.log are printed to the console. Same tail on WebUI probe failure.
  • Upgrades: append_upgrade_text_log writes to {log_dir}/update.log (same resolution as FLOCKS_LOG_DIR / FLOCKS_ROOT/logs / ~/.flocks/logs). Updater error paths and CLI flocks update (check failure, user cancel, success) append lines there.

Add uvicorn log_config with wall-clock timestamps for backend.log when
daemonized. Set PYTHONUNBUFFERED for the backend child and print recent
log lines on probe failure. Persist upgrade outcomes to update.log from
the updater and the flocks update CLI, with tests.

Made-with: Cursor
@xiami762 xiami762 requested a review from duguwanglong April 24, 2026 05:29
@xiami762 xiami762 merged commit 5ae3b10 into main Apr 24, 2026
2 checks passed
duguwanglong pushed a commit to DearEmma/flocks that referenced this pull request May 18, 2026
…pgrade-journal

fix(cli): daemon backend logs, serve timestamps, upgrade journal
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.

2 participants