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

feat(cli): add scoped debugging #828

Merged
merged 4 commits into from
Jan 3, 2018
Merged

feat(cli): add scoped debugging #828

merged 4 commits into from
Jan 3, 2018

Conversation

kjdelisle
Copy link
Contributor

@kjdelisle kjdelisle commented Jan 3, 2018

Description

Add scoped debugging to the CLI module, as well as some new debugging statements to the artifact-generator and the controller-generator.

Adding these statements to make my life easier when building the feature for the linked issue.

Related issues

connected to #727

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide

@kjdelisle kjdelisle self-assigned this Jan 3, 2018
@kjdelisle kjdelisle force-pushed the cli/enhance-debugging branch 2 times, most recently from e8d09fd to ae3e380 Compare January 3, 2018 18:52
@@ -18,6 +20,7 @@ module.exports = class ControllerGenerator extends ArtifactGenerator {
type: 'controller',
outdir: 'src/controllers/',
};
debug(`artifactInfo: ${inspect(this.artifactInfo)}`);
Copy link
Contributor

@raymondfeng raymondfeng Jan 3, 2018

Choose a reason for hiding this comment

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

Can we wrap the debug statement as follows to avoid the parameter calculation if debug is not on?

if (debug.enabled) {
  debug(`artifactInfo: ${inspect(this.artifactInfo)}`);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@kjdelisle kjdelisle force-pushed the cli/enhance-debugging branch from ae3e380 to a6045aa Compare January 3, 2018 18:53
Kevin Delisle added 2 commits January 3, 2018 13:54
Allows scoping of debug messages to specific modules (or whatever custom scope is desired)
@kjdelisle kjdelisle force-pushed the cli/enhance-debugging branch from a6045aa to 1c23e7e Compare January 3, 2018 18:57
@kjdelisle kjdelisle merged commit 8338302 into master Jan 3, 2018
@kjdelisle kjdelisle deleted the cli/enhance-debugging branch January 3, 2018 19:05
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.

2 participants