Skip to content

refactor(core): replace legacy logger with Effect logging#31310

Open
thdxr wants to merge 18 commits into
devfrom
refactor/effect-logging
Open

refactor(core): replace legacy logger with Effect logging#31310
thdxr wants to merge 18 commits into
devfrom
refactor/effect-logging

Conversation

@thdxr
Copy link
Copy Markdown
Member

@thdxr thdxr commented Jun 8, 2026

Summary

  • remove the legacy core logger and Effect logger wrapper
  • route Effect logs to one shared append-only opencode.log with readable logfmt output and a per-run run_id
  • preserve --print-logs via an explicit stderr sink and --log-level via Effect minimum log levels
  • migrate Effect-context logs to native Effect.log* calls and remove imperative logging outside Effect contexts

Testing

  • bun typecheck in packages/core
  • bun typecheck in packages/opencode
  • bun typecheck in packages/server
  • bun typecheck in packages/desktop
  • bun test test/effect/observability.test.ts in packages/core
  • bun test test/effect/app-runtime-logger.test.ts in packages/opencode
  • git diff --check origin/dev...HEAD

Notes

  • the shared log file intentionally appends across concurrent runs; every line includes run_id
  • LSP stderr pipes continue to be drained without logging to avoid child-process deadlocks

@thdxr thdxr requested review from Brendonovich and Hona as code owners June 8, 2026 04:49
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.

1 participant