Skip to content
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

Capture output #665

Closed
arcanis opened this issue Jan 12, 2021 · 2 comments
Closed

Capture output #665

arcanis opened this issue Jan 12, 2021 · 2 comments

Comments

@arcanis
Copy link

arcanis commented Jan 12, 2021

It would be useful to have a way to catch the warnings and errors to operate on them. At the moment we can't pass a stdout stream to the esbuild function, so it's difficult to redirect it anywhere.

@evanw
Copy link
Owner

evanw commented Jan 12, 2021

I'm assuming you are talking about the JavaScript API. This is possible by setting logLevel: 'silent' and then using the returned warnings and errors properties. If you're talking about the CLI instead, they are printed to stderr instead of stdout.

@arcanis
Copy link
Author

arcanis commented Jan 12, 2021

Ahhh I completely missed that! Thanks 😃

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

No branches or pull requests

2 participants