with_log_threshold | R Documentation |
Evaluate R expression with a temporarily updated log level threshold
with_log_threshold(
expression,
threshold = ERROR,
namespace = "global",
index = 1
)
expression |
R command |
threshold |
|
namespace |
logger namespace |
index |
index of the logger within the namespace |
log_threshold(TRACE)
log_trace("Logging everything!")
x <- with_log_threshold(
{
log_info("Now we are temporarily suppressing eg INFO messages")
log_warn("WARN")
log_debug("Debug messages are suppressed as well")
log_error("ERROR")
invisible(42)
},
threshold = WARN
)
x
log_trace("DONE")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.