rotate_logs: Rotate log file

View source: R/utils.R

rotate_logsR Documentation

Rotate log file

Description

Truncates the log file to the line count provided as rotate_lines.

Usage

rotate_logs(rotate_lines = 100000L, logfile = get_logfile())

Arguments

rotate_lines

The number of log entries to keep in the logfile.

logfile

Log file to truncate.

Value

Invisible NULL.

Examples

## Not run: 
  rotate_logs()

  rotate_logs(rotate_lines = 0L)

  rotate_logs(rotate_lines = 1000L, logfile = "my_log.log")

## End(Not run)

loggit2 documentation built on June 8, 2025, 10:26 a.m.