class Logging::ColorScheme

ColorScheme objects encapsulate a named set of colors to be used in the colors() method call. For example, by applying a ColorScheme that has a :warning color then the following could be used:

scheme.color("This is a warning", :warning)

ColorScheme objects are used by the Pattern layout code to colorize log messages. Each color scheme is given a unique name which is used by the Pattern layout to lookup the appropriate color scheme to use. Please refer to the Pattern layout documentation for more details - specifically the initializer documentation.

The color scheme can be applied to the Pattern layout in several ways. Each token in the log pattern can be colorized with the log level (debug, info, warn, etc) receiving unique colors based on the level itself. Another option is to colorize the entire log message based on the log level; in this mode tokens do not get their own colors. Please see the ColorScheme initializer for the list of colorization options.