Colors help logs readability. Warnings and errors are far easier to spot.
To get colors in less
output, we need to use less -R
.
/// Logs are colorified by default if and only if they output to teminal.
/// Use `DS_LOG_COLORS` environmental variable to override the default.
///
/// Examples:
/// ````
/// DS_LOG_COLORS=auto ./binary
/// DS_LOG_COLORS=yes./binary
/// DS_LOG_COLORS=no ./binary
/// ````
///
/// `DS_LOG`, `DS_LOG_COLORS` are searched in file `/etc/libds`
/// if not passed as environmental variable.
#19047