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

Use logger #54

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Use logger #54

wants to merge 4 commits into from

Conversation

varyonic
Copy link
Contributor

This PR cleans up the noisy output when running rspec. All puts and printf statements are replaced by logger.info, logger.warn or logger.error. The logger provided in each sample defaults to INFO, while the logger in the spec is ERROR only. In either case the default can be overridden by setting environment variable LOGLEVEL.

I think using Logger in SDK samples adds value in being closer to real world usage. Having clean rspec output makes it easier to identify new issues and regressions.

This is a large diff for review, but the changes are relatively simple and consistent, mostly a global search/replace of puts with logger.info.

@varyonic
Copy link
Contributor Author

varyonic commented May 11, 2018

I think the Travis build failure is an intermittent error, try re-running the job. By coincidence the output for the failed job in Travis provides a good example of showing errors only.

@varyonic
Copy link
Contributor Author

I forced a rebuild and it passed this time.

@varyonic
Copy link
Contributor Author

varyonic commented Jun 1, 2018

Updated to use SharedHelper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant