grayscale_by_log_level: Render a string with light/dark gray based on the related log...

Description Usage Arguments Value Examples

View source: R/color.R

Description

Adding color to a string to be used in terminal output. Supports ANSI standard colors 8 or 256.

Usage

1

Arguments

msg

string

level

see log_levels

Value

string with ANSI escape code

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
cat(grayscale_by_log_level(FATAL, 'foobar'), '\n')
cat(grayscale_by_log_level(ERROR, 'foobar'), '\n')
cat(grayscale_by_log_level(WARN, 'foobar'), '\n')
cat(grayscale_by_log_level(SUCCESS, 'foobar'), '\n')
cat(grayscale_by_log_level(INFO, 'foobar'), '\n')
cat(grayscale_by_log_level(DEBUG, 'foobar'), '\n')
cat(grayscale_by_log_level(TRACE, 'foobar'), '\n')

## End(Not run)

logger documentation built on Oct. 19, 2021, 9:07 a.m.