add_logs: Add Logging Capability to Connections

View source: R/cnt_logger_add_logs.R

add_logsR Documentation

Add Logging Capability to Connections

Description

This function adds logging capability to a list of connections by modifying their class attributes. It ensures that the input is of the correct type and registers the necessary S3 methods for logging.

Usage

add_logs(connections)

Arguments

connections

An object of class connectors(). This should be a list of connection objects to which logging capability will be added.

Details

The function performs the following steps:

  1. Checks if the input connections is of class "connectors".

  2. Iterates through each connection in the list and prepends the "ConnectorLogger" class.

Value

The modified connections object with logging capability added. Each connection in the list will have the "ConnectorLogger" class prepended to its existing classes.

Examples

con <- connectors(
  sdtm = connector_fs(path = tempdir())
 )

logged_connections <- add_logs(con)


connector documentation built on June 8, 2025, 11:36 a.m.