debuginfo: Debug Log Handler

View source: R/handlers_non_base.R

debuginfoR Documentation

Debug Log Handler

Description

This function works like base R's warning , but is silent, includes logging of the exception message via loggit() and does not allow conditions as input.

Usage

debuginfo(..., call. = TRUE, .loggit = NA, echo = get_echo())

Arguments

...

zero or more objects which can be coerced to character (and which are pasted together with no separator) or a single condition object.

call.

logical, indicating if the call should become part of the warning message.

.loggit

Should the condition message be added to the log? If NA the log level set by set_log_level() is used to determine if the condition should be logged.

echo

Should the log entry (json) be echoed to stdout as well?

Details

This function is more than just a wrapper around loggit() with a log level of "DEBUG". It has the ability to track the call stack and log it if call. is set to TRUE and to automatically translate the input into a message using .makeMessage(), like warning() does.

Value

No return value.

See Also

Other handlers: message(), stop(), stopifnot(), warning()

Examples

## Not run: 
  debuginfo("This is a completely false condition")

  debuginfo("This is a completely false condition", echo = FALSE)

## End(Not run)


loggit2 documentation built on June 8, 2025, 10:26 a.m.