Yaffle / EventSource

a polyfill for http://www.w3.org/TR/eventsource/
MIT License
2.11k stars 336 forks source link

supportsStreamOption error Message #149

Closed SantoJambit closed 4 years ago

SantoJambit commented 4 years ago

Currently, there is a log output, which prints a full stack trace whenever the TextDecoder polyfill is being used.

Would it be acceptable to change this to a one-liner "TextDecoder does not support streaming option. Using polyfill instead." or even suppress the message altogether?

Otherwise I'm getting spammed with stacktraces during my test-runs, which makes the log pretty hard to read.

Aside from that, we would like to not have errors in the console unless they actually cause invalid behaviour.

Yaffle commented 4 years ago

@SantoJambit , are you OK with the usage of console.debug(error) instead?

SantoJambit commented 4 years ago

@Yaffle that doesn't change anything for the better.

In our code-base we use loglevel to prevent such informations from leaking where they should not be, but I don't think one console statement is worth introducing a new dependency in this case.

Yaffle commented 4 years ago

@SantoJambit , right, what about console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e.toString()) ?

SantoJambit commented 4 years ago

@Yaffle yes, that would be good.

SantoJambit commented 4 years ago

@Yaffle when can we expect a release?

Yaffle commented 4 years ago

@SantoJambit , just released, thanks for the reminder