Learn R Programming

luzlogr (version 0.1.0)

closelog: Close current logfile

Description

Close current logfile

Usage

closelog(sessionInfo = TRUE)

Arguments

sessionInfo
Append sessionInfo output? (logical, optional)

Value

  • Number of flagged messages (numeric).

Details

Close current logfile. The number of flagged messages is returned, invisibly.

Logs are stored on a stack, and so when one is closed, logging output returns to the previous log (if any).

See Also

openlog printlog

Examples

Run this code
logfile <- openlog("A.log")
printlog("message to A", flag = TRUE)
logfile <- openlog("B.log")
printlog("message to B")
flagcountB <- closelog()
flagcountA <- closelog(sessionInfo = FALSE)

Run the code above in your browser using DataLab