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

Logging Reform. Integrate npmlog, char-spinner. Resolves gh-607 #768

Merged
merged 12 commits into from
Jun 15, 2016

Conversation

rwaldron
Copy link
Contributor

This replaces our logging with npmlog and introduces a standardized integration of "char-spinner" which is used to indicate "something is happening".

This reformed logging system will allow making all logging levels configurable, ie. any type of logging can be enabled/disabled. Note that this capability is not yet exposed to the CLI directly. A few questions need to be answered:

  • Do we persist logging flags in preferences?
  • If yes, how are the logging flags/preferences exposed? I think we need to have t2 config (and it should match npm config

Demos:

Notes:

return callControllerWith(methodName, opts);
};
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No longer used. All calls consolidated to callControllerWith

@rwaldron
Copy link
Contributor Author

cc @HipsterBrown

@HipsterBrown
Copy link
Contributor

Will review this tonight.

return new Promise(function(resolve, reject) {

log.spinner.stop();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this just making sure the spinner is defaulted to stop before starting it, in case it was not stopped by callControllerWith()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, this doesn't belong here—thanks for bringing my attention to it!

@HipsterBrown
Copy link
Contributor

Do we persist logging flags in preferences?

I say yes and agree with following the npm config pattern. This leaves room to grow into other config flags if needed.

@rwaldron
Copy link
Contributor Author

After reading the review comments, I decided to test another approach. As a result, I've pushed a completely revised version of this patch.

@HipsterBrown
Copy link
Contributor

Reviewing and smoke testing now.



controller.installDrivers = function() {
require('./tessel-install-drivers');
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this being required again for a reason? It's also on line 16:

var drivers = require('./tessel-install-drivers');

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pfft. I never even noticed that. I just copied this from the old code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

@HipsterBrown
Copy link
Contributor

Overall, I love the simplification of spinner state management. This is going to be a very useful patch.

LGTM 👍

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
…opriate locations.

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
…tions.

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
@rwaldron
Copy link
Contributor Author

@HipsterBrown thank you so much for the several-days-long review, I appreciate your help enormously <3

@rwaldron rwaldron merged commit 55978f1 into tessel:master Jun 15, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants