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

Remove duplicated logger silencing #170

Closed
jameslamb opened this issue Jan 25, 2019 · 0 comments · Fixed by #181
Closed

Remove duplicated logger silencing #170

jameslamb opened this issue Jan 25, 2019 · 0 comments · Fixed by #181
Assignees

Comments

@jameslamb
Copy link
Collaborator

Every one of our test files contains something like this:

# Configure logger (suppress all logs in testing)
# expect_silents only work with this logger turned off; only alerts with warnings
loggerOptions <- futile.logger::logger.options()
if (!identical(loggerOptions, list())){
    origLogThreshold <- loggerOptions[[1]][['threshold']]
} else {
    origLogThreshold <- futile.logger::INFO
}
futile.logger::flog.threshold(0)

See my comment on #166 ...I think it could be beneficial to add this code to setupTestEnv one time to reduce duplicated code in the project and to lower the barrier to entry for developers writing new tests on the project (one less convention to learn!).

Thoughts?

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

Successfully merging a pull request may close this issue.

2 participants