Colorize Levels
Usage
colorize_levels(
x,
colors = getOption("lgr.colors", NULL),
transform = identity
)Arguments
- x
numericorcharacterlevels to be colored. Unlike in many other functions in lgr,characterlevels are not case sensitive in this function and leading/trailing whitespace is ignored to make it more comfortable to usecolorize_levels()inside formatting functions.- colors
A
listoffunctionsthat will be used to color the log levels (likely from crayon::crayon).- transform
a
functionto transformx(for exampletoupper())
See also
Other formatting utils:
label_levels()