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

Do not log init message unless log priority set to 1 #5718

Merged
merged 8 commits into from
May 10, 2021
11 changes: 4 additions & 7 deletions modules/core/src/lib/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ if (existingVersion && existingVersion !== version) {
}

if (!existingVersion) {
// eslint-disable-next-line
if (process.env.NODE_ENV !== 'production') {
log.log(
0,
`deck.gl ${version} - set deck.log.level=1 (or higher) to trace attribute updates`
)();
}
log.log(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now.

Nit: This could be a one-liner, so wonder if this will pass the formatting check (prettier-check) in the linter. If is doesn't, running yarn lint fix should take care of it.

1,
`deck.gl ${version} - set deck.log.level=1 (or higher) to trace attribute updates`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove the set deck.log.level... message now that the level is already 1?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the part I was confused about earlier :)
I'll make that change.

)();

global.deck = Object.assign(global.deck || {}, {
VERSION: version,
Expand Down