workers-rs icon indicating copy to clipboard operation
workers-rs copied to clipboard

Use `log` instead of `console_log!`

Open jyn514 opened this issue 2 years ago • 2 comments

This will mean all the logging from libraries that developers don't control will still show up in the JS console. We could implement it by registering a log handler which outputs to the JS console.

jyn514 avatar Aug 24 '21 19:08 jyn514

yea that's a good idea. console_log! simply wraps some websys code to write to JS console, and could be re-used under the hood of the handler registered with log. i'd still like to keep console_log! available to users though as a convenience. for one-off logging, it is kind of nice.

nilslice avatar Aug 24 '21 20:08 nilslice

leaving a reminder to take a look at https://docs.rs/console_log/0.2.0/console_log/

nilslice avatar Sep 01 '21 06:09 nilslice