Skip to contents

The specified text is printed and written to the current log file. Does not overwrite the file. Also used internally by many functions in the package.

Usage

log_text(text)

Arguments

text

The text to be logged

Value

None, the function is invoked for its side effect.

See also

Examples

file_name <- "log.txt"
init_log(file_name)
#> INFO [2025-06-23 22:36:43] Starting logging
log_text("Hello World!")
#> INFO [2025-06-23 22:36:43] Hello World!
# Print the contents of the file
scan(file_name, sep = "\n", what = "character")
#> [1] "INFO [2025-06-23 22:36:42] Starting logging"
#> [2] "INFO [2025-06-23 22:36:43] Starting logging"
#> [3] "INFO [2025-06-23 22:36:43] Hello World!"