Learn R Programming

MazamaCoreUtils (version 0.6.2)

initializeLogging: Initialize standard log files

Description

Create a standard set of MazamaCoreUtils log files.

Usage

initializeLogging(logDir = NULL, filePrefix = "", createDir = TRUE)

Value

No return value. Called for side effects.

Arguments

logDir

Directory in which to write log files.

filePrefix

Character string prepended to log file names.

createDir

Logical specifying whether to create logDir if it does not already exist.

Details

This convenience function creates or validates a log directory, archives any existing standard log files by appending a UTC timestamp, and then initializes logging with logger.setup().

Standard log files include:


TRACE.log
DEBUG.log
INFO.log
WARN.log
ERROR.log

When filePrefix is supplied, it is prepended to each log file name.

See Also

logger.setup()