Learn R Programming

ambiorix (version 2.2.0)

new_log: Logger

Description

Returns a new logger using the log package.

Usage

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

Value

An R& of class log::Logger.

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.

Examples

Run this code
log <- new_log()
log$log("Hello world")

Run the code above in your browser using DataLab