Learn R Programming

ambiorix (version 2.1.0)

new_log: Logger

Description

Returns a new logger using the log package.

Usage

new_log(prefix = ">", write = FALSE, file = "ambiorix.log", sep = "")

Arguments

prefix

String to prefix all log messages.

write

Whether to write the log to the file.

file

Name of the file to dump the logs to, only used if write is TRUE.

sep

Separator between prefix and other flags and messages.

Value

An R& of class log::Logger.

Examples

Run this code
# NOT RUN {
log <- new_log()
log$log("Hello world")

# }

Run the code above in your browser using DataLab