Learn R Programming

SCDB (version 0.5.1)

LoggerNull: LoggerNull: The no-logging Logger

Description

The LoggerNull class overwrites the functions of the Logger so no logging is produced. Errors and warnings are still produced.

Arguments

Value

A new instance of the LoggerNull

R6 class.

Super class

SCDB::Logger -> LoggerNull

Methods

Inherited methods


Method new()

Create a new LoggerNull object

Usage

LoggerNull$new(...)

Arguments

...

Captures arguments given, but does nothing


Method log_to_db()

Matches the signature of Logger$log_to_db(), but does nothing.

Usage

LoggerNull$log_to_db(...)

Arguments

...

Captures arguments given, but does nothing


Method finalize_db_entry()

Matches the signature of Logger$finalize_db_entry(), but does nothing.

Usage

LoggerNull$finalize_db_entry(...)

Arguments

...

Captures arguments given, but does nothing


Method clone()

The objects of this class are cloneable with this method.

Usage

LoggerNull$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
  logger <- LoggerNull$new()

  logger$log_info("This message will not print!")
  logger$log_to_db(message = "This message will no be written in database!")
  try(logger$log_warn("This is a warning!"))
  try(logger$log_error("This is an error!"))

Run the code above in your browser using DataLab