Skip to content

Add neasted calling of withMadratLogging with different parameters and add warningsAsErrors parameter - #309

Open
tobiasdiez wants to merge 1 commit into
masterfrom
nested_logging
Open

Add neasted calling of withMadratLogging with different parameters and add warningsAsErrors parameter#309
tobiasdiez wants to merge 1 commit into
masterfrom
nested_logging

Conversation

@tobiasdiez

Copy link
Copy Markdown

This PR changes how withMadratLogging() behaves when calls are nested.

Previously, the first, outermost call installed the handlers. Every nested withMadratLogging() call then returned its expression immediately. As a result, its logOnly argument had no effect: all warnings and errors were handled according to the outermost call’s settings.

With this PR, each withMadratLogging() call temporarily introduces its own policy with the following update mechanism:

  • An explicitly supplied nested argument overrides settings locally.
  • An omitted nested argument inherits the enclosing policy.

Also this PR introduces a warningsAsErrors argument to withMadratLogging so that warnings are logged as errors with the correct verbosity handling.

@tobiasdiez

Copy link
Copy Markdown
Author

Running buildLibrary hangs for me with:

....
─  checking tests ... SKIPPED
✔  checking for unstated dependencies in vignettes ...
✔  checking package vignettes ...
✔  checking re-building of vignette outputs (3.9s)
✔  checking for non-standard things in the check directory
✔  checking for detritus in the temp directory ...
   

any idea what's the problem?

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.

1 participant