make_log: Create a log message

Description Usage Arguments Value Examples

View source: R/nhl_log.R

Description

Create a log message

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
make_log(
  msg,
  ...,
  type = "I",
  dtFormat = getOption("nhlapi_log_datetime"),
  newLine = FALSE,
  sep = " | ",
  collapse = " ",
  lineBreak = "$",
  endNewLine = FALSE
)

Arguments

msg

character(1), to be logged.

...

additional character() strings to be logged. Will be pasted to msg and collapsed using the collapse argument.

type

character(1) ideally 1 uppercase letter.

dtFormat

character(1), passed to format for [Sys.time()]

newLine

logical(1), if TRUE, new line will be pasted. to the beginning of the message.

sep

character(1) string, to separate parts of the message.

collapse

character(1), to collapse msg and ....

lineBreak

character(1), replacing line breaks in msg.

endNewLine

logical(1), if TRUE, new line will be pasted to the end of the message.

Value

character(1), constructed log message.

Examples

1
  nhlapi:::make_log("Dummy warning", type = "W")

nhlapi documentation built on Feb. 20, 2021, 9:06 a.m.