set_logfile {loggit2}R Documentation

Set Log File

Description

Set the log file that loggit will write to.

Usage

set_logfile(logfile = NULL, confirm = TRUE, create = TRUE)

Arguments

logfile

Absolut or relative path to log file. An attempt is made to convert the path into a canonical absolute form using normalizePath(). If NULL will set to ⁠<tmpdir>/loggit.log⁠.

confirm

Print confirmation of log file setting? Defaults to TRUE.

create

Create the log file if it does not exist? Defaults to TRUE.

Details

No logs outside of a temporary directory will be written until this is set explicitly, as per CRAN policy. Therefore, the default behavior is to create a file named loggit.log in your system's temporary directory.

Value

Invisible NULL.

Examples

set_logfile(file.path(tempdir(), "loggit.log"))


[Package loggit2 version 2.2.2 Index]