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

🙋 Allow logger to be configured about appending vs. cleaning console #1527

Closed
mohsen1 opened this issue Jun 12, 2018 · 2 comments
Closed

Comments

@mohsen1
Copy link
Contributor

mohsen1 commented Jun 12, 2018

🙋 Development Logging without cleaning console

Currently when running Parcel in development mode, logger will clean up console on each build. It's usually desired to have a clean console but when integrating with other tools such as VSCode, it's desired to have output of logger concatenated to previous logs instead of clearing the console. VSCode uses output of a program in "tasks" to determine if a task is ready or not. With current setup VSCode is not capable of doing that.

🤔 Expected Behavior

Have a config for logger (maybe level 4) where all logs persist

😯 Current Behavior

Logger clears the console

🔦 Context

microsoft/vscode#6209 (comment)
https://github.com/mohsen1/parcel-react-typescript-vscode

💻 Examples

@Morgul
Copy link

Morgul commented Jun 17, 2018

You could, technically, do process.env['FORCE_COLOR'] = 0; before importing parcel, and that should turn off the clearing behavior. It's an ugly hack, but I think it should work.

Edit: Just looked at the issues, and misunderstood, thought you were asking for a code api. In your case, it looks like you can use environment variables, so just set FORCE_COLOR to 0. That's what I do for Webstorm.

Either way, I'd love to see more documentation, an api, and a commandline flag for this.

@DeMoorJasper
Copy link
Member

Duplicate of #993

@DeMoorJasper DeMoorJasper marked this as a duplicate of #993 Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants