make_log {nhlapi}R Documentation

Create a log message

Description

Create a log message

Usage

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

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

[Package nhlapi version 0.1.4 Index]