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

Added .logger support to .api.setOptions #239

Merged
merged 2 commits into from
Sep 6, 2017

Conversation

relativityboy
Copy link
Contributor

Add support for an injectable external logger to api. Logger could be a function, or an object with functions for different log levels à la quirky's logger.

Implementing logging within a function is as easy as this.log('level', [logitem1, ....[logitemN]])

Logging can be stopped by calling .setOptions({logging:false})

Copy link
Contributor

@sneak sneak left a comment

Choose a reason for hiding this comment

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

lgtm except that it should be run through 'prettier' with four space indents

Copy link
Contributor

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

The intend should be specified here so IDE can adapt:

indent_size = 2

Actually most of the library use 2 spaces intend we might want to set the same format on the whole library.

Copy link
Contributor

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

This PR look good for me anyway the whole intend can be changed in another PR

@relativityboy
Copy link
Contributor Author

@bonustrack - please merge. I don't have perms for that.

@bonustrack bonustrack merged commit 5f50ad5 into master Sep 6, 2017
@bonustrack bonustrack deleted the api-injected-logging-support branch September 6, 2017 17:30
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

3 participants