feat(core): write logs as state jsonl#30966
Open
opencode-agent[bot] wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
Updated per review: removed Fresh terminal-control evidence from the updated tree: Verification run after this update:
|
Contributor
Author
|
Terminal log output snapshot from this run: Verification on the pushed branch:
|
Contributor
Author
|
Follow-up for logger-handle removal:
Evidence: $ grep search: EffectLogger.create|Log.create|EffectLogger.logger|Effect.runSync(Effect.log*)
# no matches in packages/**/*.ts
$ bun test test/util/log.test.ts --timeout 30000
3 pass, 0 fail
$ bun test test/effect/app-runtime-logger.test.ts --timeout 30000
4 pass, 0 fail
$ bun typecheck # packages/core
pass
$ bun typecheck # packages/opencode
pass
$ bun typecheck # packages/console/core
pass
$ PATH="/tmp/opencode/bun-1.3.14/node_modules/.bin:$PATH" git push origin feat/jsonl-log-file
pre-push: bun turbo typecheck
19 successful, 19 totalCommit: |
Contributor
Author
|
follow-up for the logger-handle cleanup:
verification:
|
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.
Summary
@opencode-ai/core/effect/loggerand deletepackages/core/src/util/log.tsLog.initand the nodeLogexport; CLI flags now set runtime env (OPENCODE_LOG_FILE,OPENCODE_LOG_LEVEL,OPENCODE_PRINT_LOGS) before Effect runtimes are built$XDG_STATE_HOME/opencode/log.jsonlts,level,message,run_id,process_role,pid,service, andfieldsEvidence
Fresh terminal-control snapshot is posted in PR comment: #30966 (comment)
Verification
bun test test/util/log.test.ts --timeout 30000bun test test/effect/app-runtime-logger.test.ts --timeout 30000bun test test/server/httpapi-sync.test.ts --timeout 30000bun typecheckinpackages/corebun typecheckinpackages/opencodebun typecheckinpackages/desktopbun turbo typecheckwith Bun1.3.14