这是indexloc提供的服务,不要输入任何密码
Skip to content

swap out log for tracing and add the TurboFormatter #4694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 27, 2023
Merged

Conversation

arlyon
Copy link
Contributor

@arlyon arlyon commented Apr 25, 2023

This allows us to switch out facades when needed and sets up a default facade for stdout that follows the current formatting for turbo which is to simply ignore all event fields except the message.

The output format is identical.

@vercel
Copy link

vercel bot commented Apr 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-cra-web 🔄 Building (Inspect) Apr 27, 2023 11:23am
examples-kitchensink-blog 🔄 Building (Inspect) Apr 27, 2023 11:23am
examples-vite-web 🔄 Building (Inspect) Apr 27, 2023 11:23am
turbo-site 🔄 Building (Inspect) Visit Preview Apr 27, 2023 11:23am
7 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Apr 27, 2023 11:23am
examples-designsystem-docs ⬜️ Ignored (Inspect) Apr 27, 2023 11:23am
examples-gatsby-web ⬜️ Ignored (Inspect) Apr 27, 2023 11:23am
examples-native-web ⬜️ Ignored (Inspect) Apr 27, 2023 11:23am
examples-nonmonorepo ⬜️ Ignored (Inspect) Apr 27, 2023 11:23am
examples-svelte-web ⬜️ Ignored (Inspect) Apr 27, 2023 11:23am
examples-tailwind-web ⬜️ Ignored (Inspect) Apr 27, 2023 11:23am

Copy link
Member

@tknickman tknickman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good to me - I'll let a rust pro check it out but nothing blocking from my end

@github-actions
Copy link
Contributor

github-actions bot commented Apr 25, 2023

🟢 CI successful 🟢

Thanks

Copy link
Contributor

@mehulkar mehulkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did you mean by "facade" in the PR description? Are we planning to invoke Rust to log things from Go land?

});

builder.init();
// respect TURBO_LOG_VERBOSITY env var
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this new? i didn't know this was a thing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All I mean is that tracing lets you output logs to a bunch of different places; stdout, files, opentelemetry and even chrome tracing through the same logging / span infrastructure :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our default 'subscriber' is one that prints to stdout following the same format as our go code.

arlyon added 3 commits April 27, 2023 09:55
This allows us to switch out facades when needed and sets up a default
facade for stdout that follows the current formatting for turbo which
is to simply ignore all event fields except the message
@arlyon arlyon force-pushed the refactor/tracing branch from 249a0fb to d4893c5 Compare April 27, 2023 11:22
@arlyon arlyon merged commit afdd37c into main Apr 27, 2023
@arlyon arlyon deleted the refactor/tracing branch April 27, 2023 12:00
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.

4 participants