initialize_logger: Initialize Futile Logger

Description Usage Arguments Value Examples

View source: R/utility_functions.R

Description

This function is used to initialize the futile.logger so that the user can be notified with the current status of running RBC.

Usage

1
initialize_logger(log_level = 6, log_path = NULL)

Arguments

log_level

a parameter representing a threshold, which affects the visibility of a given logger. If the log level is at or higher in priority than the logger threshold, a message will print. Otherwise the command will silently return. The value of the log_level is a number between 1 and 9. 9 or futile.logger::TRACE will show all messages in details.

log_path

A path for the output log files generated by the logger. If NULL, all messages will be displayed in the calling environment.

Value

it runs on side effects but also return a simple message.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## futile.logger::FATAL: 1
## futile.logger::ERROR: 2
## futile.logger::WARN:  4
## futile.logger::INFO:  6
## futile.logger::DEBUG: 8
## futile.logger::TRACE: 9

## to suppresse log messages to the console
migrbc::initialize_logger(log_level = 1)

## to display all messages to the console
migrbc::initialize_logger(log_level = 9)

migrbc documentation built on July 1, 2020, 8:14 p.m.