logcolourer has a single configuration file, by default /etc/logcolourer.conf or /usr/local/etc/logcolourer.conf. Use a non-default configuration by specifying the file name as the parameter to logcolourer.
logcolourer my.conf <plain.log >coloured.log
The sample supplied is designed to work on terminals with a black background. You will need to change it to work with a white or coloured background, as some severities will have insufficient contrast to be visible. You will need to change it if you suffer from red-green or total colour vision deficiency
The file specifies the colours, intensities and attributes applied to lines processed by the logcolourer program.
Rendering | Values |
---|---|
colour | red yellow, green, blue, magenta, cyan and white |
intensity | normal and bright or bold |
attribute | blink, reverse and underline |
The default colour is white, and the default attribute and intensity are normal.
The sample configuration is
bright blink white # 0 - Emergency yellow reverse # 1 - Alert bold red reverse # 2 - Critical bright red # 3 - Error bright yellow # 4 - Warning bright green # 5 - Notice bright blue # 6 - Information white # 7 - Debug