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

Remove console.error from geoblaze #190

Open
chrispahm opened this issue Aug 9, 2022 · 0 comments
Open

Remove console.error from geoblaze #190

chrispahm opened this issue Aug 9, 2022 · 0 comments

Comments

@chrispahm
Copy link

chrispahm commented Aug 9, 2022

First of all: Thanks for this awesome library! 🚀 🔥

Describe the bug
Before throwing an error, geoblaze currently also logs the error to the console using console.error (see here for an example

console.error(e);
.

Especially when working with large datasets, the excessive logging becomes a serious performance hit (see https://stackoverflow.com/a/26754011/6213343), and there is no option to turn it off.

To Reproduce
See the following Observable notebook:
https://observablehq.com/@chrispahm/geoblaze-unsupported-geometry-type
When opening the console, a log of the error can be found.

Expected behavior
IMHO logging should only happen on the user side. Instead of relying on geoblaze to log to the console, I think the library should just throw the error so users can decide how to proceed.

Another approach could be to pass a debug option to the geoblaze function that enables logging.

P.S.: I can create a PR if desired!

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

No branches or pull requests

1 participant