logger.start {RnBeads} | R Documentation

## Log File Management

### Description

Functions for logger management.

### Usage

    logger.start(txt = character(0), fname = NULL)

    logger.completed()

    logger.close()

### Arguments

`txt` | Description to add to the log file. The words `STARTED` and `COMPLETED` are prepended to the message upon initialization and completion of the section, respectively.
`fname` | Name of the log file and/or console. Note that at most one file name can be specified. The function `logger.start` normalizes the given name, that is, it converts it to an absolute name. If this parameter is `NA`, logger messages are printed to the console. If it is a two-element vector containing one file name and `NA`, the logger is (re)initialized to print messages both to the given file name and the console. A value of `NULL` (default) indicates the logger should continue using the previously specified file.

### Value

None (invisible `NULL`).

### Details

`logger.start` initializes the logger and/or starts a new section. `logger.completed` completes the last (innermost) open section in the log. `logger.close` deinitializes the logger. Note that after reinitialization or deinitialization, the information about the current output file, as well as any open sections, is deleted.

### Author(s)

Yassen Assenov

### See Also

logger.isinitialized

### Examples

    if (!logger.isinitialized())
      logger.start(fname = NA)
    logger.start("Tests for Significance")
    logger.completed()
    logger.close()

[Package RnBeads version 1.12.1 Index]