Learn R Programming

logr (version 1.3.7)

log_suspend: Suspends the log

Description

The log_suspend function function suspends printing to the log, but does not close it. The function will not print the log footer. To reopen the log, call log_resume.

Usage

log_suspend()

Arguments

Value

None

See Also

log_resume to continue logging.

Examples

Run this code
library(logr)

# Create temp file location
tmp <- file.path(tempdir(), "test.log")

# Open log
lf <- log_open(tmp)

# Send message to log
log_print("Before suspend")

# Suspend log
log_suspend()

# View suspended log
writeLines(readLines(lf))

# Resume log
log_resume(lf)

# Print data to log
log_print("After suspend")

# Close log
log_close()

# View results
writeLines(readLines(lf))

Run the code above in your browser using DataLab