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

We should consider a writable stream endpoint for the console #150

Open
domenic opened this issue Oct 23, 2018 · 4 comments
Open

We should consider a writable stream endpoint for the console #150

domenic opened this issue Oct 23, 2018 · 4 comments

Comments

@domenic
Copy link
Member

domenic commented Oct 23, 2018

E.g. it'd be nice to be able to do .pipeTo(console.writable) or maybe .pipeTo(console.createWritable("log")) or something.

We should prototype this in JavaScript and publish an npm package and stuff and see if it gets usage. But I wanted to log the idea while it came to me, and start the discussion if people are interested.

/cc @ricea.

@ricea
Copy link

ricea commented Oct 23, 2018

I prefer the second form, since I don't think it makes sense to have the console locked to a particular source.

I'm interested in whether we could give a hint to the console on what the chunks mean. Maybe something as simple as "text" or "binary" initially

@domenic
Copy link
Member Author

domenic commented Oct 23, 2018

I was figuring we'd leave the display to the usual console.log logic. E.g. if you log a Uint8Array it looks one way, if you log a string it looks another way.

@terinjokes
Copy link
Collaborator

Would this API have access to other parts of Console (eg, grouping, timing)?

@domenic
Copy link
Member Author

domenic commented Nov 14, 2018

That seems hard to envision... I think it's mostly for when you have an incoming string stream, and so unless we had some way of coding those into strings (terminal escape codes!?) then probably no grouping or timing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants