ez.log: Prints/Directs output to both terminal and a file (log.txt)...

View source: R/io.R

ez.logR Documentation

Prints/Directs output to both terminal and a file (log.txt) globally, wrapper of sink

Description

recommend to use logon(), logoff(), which are convenient shortcuts of log()

Usage

ez.log(file = "log.txt", mode = "a", status = TRUE, timestamp = TRUE)

Arguments

mode

a=append; w=overwrite

status

T=open the redirection/file, F=close the redirection

timestamp

T=insert timestamp at the beginning and end, F=otherwise

Value

nothing

See Also

ez.print

Examples

# logging on: log("thelog.txt")
# logging off: log(status=False)  # no need to pass in the file parameter

jerryzhujian9/zmisc documentation built on March 9, 2024, 12:49 a.m.