cat2: Color Output

Description Usage Arguments Details Value

View source: R/strings.R

Description

Color Output

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
cat2(
  ...,
  level = "DEBUG",
  print_level = FALSE,
  file = "",
  sep = " ",
  fill = FALSE,
  labels = NULL,
  append = FALSE,
  end = "\n",
  pal = list(DEBUG = "grey60", INFO = "#1d9f34", WARNING = "#ec942c", ERROR =
    "#f02c2c", FATAL = "#763053", DEFAULT = "grey60"),
  use_cli = TRUE,
  bullet = "auto"
)

Arguments

...

to be printed

level

'DEBUG', 'INFO', 'WARNING', 'ERROR', or 'FATAL' (total 5 levels)

print_level

if true, prepend levels before messages

file, sep, fill, labels, append

pass to base::cat

end

character to append to the string

pal

a named list defining colors see details

use_cli

logical, whether to use package 'cli'

bullet

character, if use 'cli', which symbol to show. see symbol

Details

There are five levels of colors by default: 'DEBUG', 'INFO', 'WARNING', 'ERROR', or FATAL. Default colors are: 'DEBUG' (grey60), 'INFO' (#1d9f34), 'WARNING' (#ec942c), 'ERROR' (#f02c2c), 'FATAL' (#763053) and 'DEFAULT' (#000000, black). If level is not in preset five levels, the color will be "default"-black color.

Value

none.


dipsaus documentation built on Sept. 6, 2021, 5:08 p.m.