enable_logging: Verbose Logging

View source: R/logger.R

enable_loggingR Documentation

Verbose Logging

Description

[Experimental]

A family of wrappers of selected futile.logger functions that control the logging mechanism in crmPack. The crmPack uses futile.logger package for the logging purposes. All the messages logged in crmPack are logged into crmPack logger at the futile.logger::TRACE level. Hence, enabling verbose logging means that the logging threshold will be set to futile.logger::TRACE for the crmPack logger, and disabling verbose logging means that it will be set to futile.logger::FATAL.

Usage

enable_logging()

disable_logging()

is_logging_enabled()

log_trace(msg, ..., capture = FALSE)

Arguments

msg

The message to log

...

Optional arguments to populate the format string

capture

Capture print output of variables instead of interpolate

Functions

  • enable_logging(): A simple wrapper of futile.logger::flog.threshold() that enables crmPack verbose logging by setting logging threshold to futile.logger::TRACE for crmPack logger.

  • disable_logging(): A simple wrapper of futile.logger::flog.threshold() that disables crmPack verbose logging by setting logging threshold to futile.logger::FATAL for crmPack logger.

  • is_logging_enabled(): A simple wrapper of futile.logger::flog.logger() that checks whether current threshold level for crmPack logger is verbose, which is futile.logger::TRACE. It returns TRUE if the current logging level is verbose, FALSE otherwise.

  • log_trace(): A simple wrapper of futile.logger::flog.trace() that prints a log message in the crmPack logger.


Roche/crmPack documentation built on April 30, 2024, 3:19 p.m.