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

Confusing //console.log comments in code base #450

Closed
baterson opened this issue Aug 3, 2024 · 2 comments
Closed

Confusing //console.log comments in code base #450

baterson opened this issue Aug 3, 2024 · 2 comments

Comments

@baterson
Copy link
Contributor

baterson commented Aug 3, 2024

Hello @techniq I've been exploring the code base and find some debug comments like this:

// console.log('clicked:menuItems', e.target, menuEl);

// console.log('clicked:menuItems', e.target, menuEl);

If someone just forgot to remove it, I would be happy to contribute to remove similar comments :)

@techniq
Copy link
Owner

techniq commented Aug 3, 2024

Hey @baterson 👋. There is definitely some cleanup that can be done with console.log.

One thing I plan to do is leverage Logger which lets you opt into these messages by component/level at runtime via localStorage.logger = '...'. I think I left many of these as breadcrumbs to add (see issue). If you would want to start that process of using Logger that would be awesome!

Using SelectField as a reference should help, but you basically just create an instance for the component...

const logger = new Logger('Menu');

then replace console.log() with logger.debug(), logger.info(), logger.error(), etc.

@techniq
Copy link
Owner

techniq commented Aug 4, 2024

Closed via #452

@techniq techniq closed this as completed Aug 4, 2024
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

2 participants