paws_config_log {paws.common}R Documentation

paws logging system

Description

Ability to configure paws logging system, through the use of paws helper function `paws_config_log` or R:base options function. Users are able to change logging levels without calling paws.common by the use of options e.g. options("paws.log_level" = 2L).

Usage

paws_config_log(
  level = 2L,
  file = "",
  timestamp_fmt = "%Y-%m-%d %H:%M:%OS3"
)

Arguments

level

(integer) to determine the level logging threshold.

  • 4L: DEBUG

  • 3L: INFO

  • 2L: WARNING

  • 1L: ERROR

file

(character) path for logs to populate, default output logs to console.

timestamp_fmt

(character) for timestamp format, see format.POSIXct().

Examples

# log to a file
temp_file <- tempfile()
paws_config_log(file = temp_file)
unlink(temp_file)

# change log threshold to INFO
paws_config_log(level = 3L)

# reset to default config
paws_config_log()

[Package paws.common version 0.7.2 Index]