Log code without having to explicitly use the loggit2
handlers.
This is particularly useful for code that cannot be customized, e.g. from third-party packages.
Usage
with_loggit(
exp,
logfile = get_logfile(),
echo = get_echo(),
log_level = get_log_level()
)
Details
If loggit2
handlers are already used in the expression, this can lead to conditions being logged
twice (in the same or different files).