meteorrn / meteor-react-native

Meteor client for React Native matching Meteor Spec
https://guide.meteor.com/react-native.html
Other
59 stars 31 forks source link

fix: enableVerbose() not setting isVerbose correctly #140

Closed taras-danyliuk closed 10 months ago

taras-danyliuk commented 10 months ago

Summary

Fix broken Meteor.enableVerbose() due to setting isVerbose in wrong scope.

Involved parts of the project

pretty much all parts :)

Targeted Meteor release version

doesn't affect communication with Meteor

Reproduction

Currently Meteor.enableVerbose() doesn't log extra info. With this fix Meteor.enableVerbose() brings back all console.warn logs

jankapunkt commented 10 months ago

Thank you for pointing this out! If I get it correct then you aim to make the Meteor.isVerbose calls to work when used in the other files, right? This is good but seems to cause the logs in the Meteor file to not work anymore, because there is often if (isVerbose) { using the local variable.

This is not your fault, but due to bad design (using a local variable and a property at the same time to determine if is verbose).

In order to make really all verbosity statements work I propose the following changes:

Would you mind updating your pull request accordingly?

taras-danyliuk commented 10 months ago

I don't think it is needed to mark enableVerbose as deprecated. I didn't notice isVerbose usage as local variable, let me check and correct it