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

Clean up / refactor logging #579

Merged
merged 2 commits into from
Mar 24, 2015
Merged

Conversation

sethkinast
Copy link
Contributor

Similar to LinkedInAttic/dustjs-helpers#119

Normalizes all log messages, removes some spew, fixes some logs that would never be logged, and removes the indexOf shim in favor of a map lookup.

Closes #485

@sethkinast
Copy link
Contributor Author

Reduces logspew by ~600 lines

* Compile a template to an invokable function.
* If `name` is provided, also registers the template under `name`.
* @param source {String} template source
* @param name {String} template name
Copy link
Contributor

Choose a reason for hiding this comment

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

template name is optional. i think there's a jsdoc syntax for that @param [name] {string}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, updated

@jimmyhchan
Copy link
Contributor

LOOKS good!

@sethkinast
Copy link
Contributor Author

@@ -710,7 +677,6 @@
} else if (skip) {
return skip(this, context);
}
dust.log('Not rendering exists (?) block in template [' + context.getTemplateName() + '], because above key was not found', DEBUG);
Copy link
Contributor

Choose a reason for hiding this comment

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

We may have to keep this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added back

@sethkinast
Copy link
Contributor Author

Updated with Prash's comments:

  • e -> err
  • returned debug messages for exists and nexists

prashn64 added a commit that referenced this pull request Mar 24, 2015
@prashn64 prashn64 merged commit 834012d into linkedin:master Mar 24, 2015
@sethkinast sethkinast deleted the log-language branch March 25, 2015 00:13
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.

seterrors should log as errors
3 participants