Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

wasi log context as optional #60

Open
guybedford opened this issue Jan 12, 2023 · 3 comments
Open

wasi log context as optional #60

guybedford opened this issue Jan 12, 2023 · 3 comments

Comments

@guybedford
Copy link

I wonder if it might be worth making the "context" argument for wasi logging entirely optional?

This way, both global and contextual logging could be supported.

@sunfishcode
Copy link
Member

This certainly makes sense from the perspective of "stderr", a concept shared by many programming languages, which is conceptually a "global " log.

I don't know if it generalizes beyond that though. I've sketched up a wasi-stderr API to cover the stderr case (and also fix the newline issue). If that makes sense, then perhaps wasi-logging should just focus on the contextual logging case?

@guybedford
Copy link
Author

Assuming stderr can be fully relied upon for the general case in this way, then that distinction makes sense to me.

@sunfishcode
Copy link
Member

Stderr now uses a dedicated wasi-stderr interface rather than using wasi-logging, so it no longer requires a context and no longer prints extra noisy output.

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

No branches or pull requests

2 participants