Convert io.debug into console.debug for JavaScript #3283
Arian94
started this conversation in
Ideas & suggestions
Replies: 3 comments 3 replies
-
It writes to stderr when possible. We could call console.debug when that isn't available. What would you see as being the advantages? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Your focus is on NodeJs and Deno. If working on a browser, there will be
differences.
```console.debug``` only works if the Verbose mode is active in the
DevTools. I think it would be a small improvement on integrating Gleam and
JS if io.debug translates to console.debug.
…On Sun, Jun 16, 2024, 22:09 Louis Pilfold ***@***.***> wrote:
It writes to stderr when possible. We could call console.debug when that
isn't available. What would you see as being the advantages?
—
Reply to this email directly, view it on GitHub
<#3283 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQGAO3N5W643F7SNA5YLTD3ZHXEWBAVCNFSM6AAAAABJMJXOBOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOOBXHA3DA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
It's not a disadvantage.
In NodeJs and Deno it will always log the meesage.
In a browser, a front-end developer may want to see some messages only in
the Verbose mode. That's why io.debug becomes useful. I don't want to see
my less-important messages be shown in the Default mode.
If a message is desired to be shown as usual the io.print would be the
proper function.
…On Mon, Jun 17, 2024, 01:20 Louis Pilfold ***@***.***> wrote:
Then not being printed by default seems like it would be a disadvantage,
and it would mean that the function has a different behaviour in the
browser compared to other runtimes where it would always print.
—
Reply to this email directly, view it on GitHub
<#3283 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQGAO3JNM4MNJRV2RI4MAITZHX3B7AVCNFSM6AAAAABJMJXOBOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOOBYGQ3DC>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Isn't it a better idea to convert the
io.debug
to its counterpart in JS which isconsole.debug
?ATM, it outputs
console.log
.Beta Was this translation helpful? Give feedback.
All reactions