feat: Add experimental structured logging with --json and --log-file flags#12405
Merged
anthonyshew merged 1 commit intomainfrom Mar 20, 2026
Merged
feat: Add experimental structured logging with --json and --log-file flags#12405anthonyshew merged 1 commit intomainfrom
--json and --log-file flags#12405anthonyshew merged 1 commit intomainfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
--json and --log-file flags
c4c9763 to
b810b07
Compare
…flags Add machine-readable JSON output for turbo run via two new CLI flags: - --json: Stream NDJSON to stdout (disables TUI, forces stream mode) - --log-file [path]: Write structured JSON array to a file Also supported via TURBO_LOG_FILE environment variable. Includes documentation in the run command reference and system environment variables pages, marked as experimental.
b810b07 to
52dbe36
Compare
github-actions bot
added a commit
that referenced
this pull request
Mar 20, 2026
## Release v2.8.21-canary.2 Versioned docs: https://v2-8-21-canary-2.turborepo.dev ### Changes - fix: Strip JSX components from heading anchors and TOC entries (#12404) (`3abe553`) - fix: Move docs app icons into app/ directory (#12403) (`ddf3918`) - feat: Add experimental structured logging with `--json` and `--log-file` flags (#12405) (`7ca0601`) - release(turborepo): 2.8.21-canary.1 (#12407) (`adebb95`) - docs: Downgrade Next.js (#12408) (`281e89b`) - chore: Deprecate the `turbo scan` command (#12406) (`4a12c26`) Co-authored-by: Turbobot <[email protected]>
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
--jsonflag to stream NDJSON to stdout and--log-file [path]flag to write structured JSON logs to a file, both behind an experimental markerTURBO_LOG_FILEenvironment variable as an alternative to the CLI flaglogFilefromturbo.json— structured logging is a per-invocation concern better suited to CLI flags and env vars than checked-in configHow to test
Each JSON entry has
timestamp,source,level, andtextfields. ANSI escape sequences are stripped in file output.