manageArchive: (internal) Logging archive manager

Description Usage Arguments Methods (by class)

Description

The method moves expired log files into archive and deletes old archived files based on given conditions.

Usage

1
2
3
4
5
manageArchive(object, workFile, archiveDir, type, ...)

## S4 method for signature 'Commons,character'
manageArchive(object, workFile, archiveDir,
  type = "infojson", ..., maxSizeInMb = 1, keptDay = 90, minFileAge = 1)

Arguments

object

Commons class object.

workFile

a character string. The path to the log file, such as project_setup.log.

archiveDir

a character string. The path to the archive directory.

type

a character string. The logging type of either 'setup' for project_setup.log or 'process' for data_process.log.

...

There are optional arguments.

maxSizeInMb

an integer. (optional) The maximum size (MB) of a log file. The log file is moved to the archived_log directory after reaching the maxSizeInDb (default 1MB).

keptDay

an integer. (optional) The maximum days of an archived log file is kept. The archived log file is deleted after the durationDay (default 90 days).

minFileAge

an integer. (optional) The minimum age in days of a file can be archived.

Methods (by class)


jameslhao/dbgapr_dev documentation built on May 8, 2019, 11:03 p.m.