new.logger: new logger

View source: R/logger.R

new.loggerR Documentation

new logger

Description

Constructs a new logger object. Allows for writing to log files and stdout. Entries are tagged by time stamps and event type.

Usage

new.logger(logfile)

Arguments

logfile

the name of the log file

Value

a new logger object with the following methods:

info(...)

writes an info message to the log file

warn(...)

writes an warning message to the log file

err(...)

writes an error message to the log file

Examples

logger <- new.logger("mylogfile.log")
logger$info("This is a test log entry!")


jweile/yogilog documentation built on April 7, 2022, 11:38 p.m.