Learn R Programming

omopgenerics (version 1.3.0)

createLogFile: Create a log file

Description

Create a log file

Usage

createLogFile(logFile = here::here("log_{date}_{time}"))

Value

Invisible TRUE if logger was created correctly.

Arguments

logFile

File path to write logging messages. You can use '{date}' and '{time}' to add the date and time in the log file name.

Examples

Run this code
library(dplyr)

logFile <- tempfile(pattern = "log_{date}_{time}", fileext = ".txt")
createLogFile(logFile = logFile)

logMessage("Starting analysis")
1 + 1
logMessage("Analysis finished")

res <- summariseLogFile()

glimpse(res)

tidy(res)

Run the code above in your browser using DataLab