Dancer::Logger::ColorConsole is a colored console-based logging engine that prints your logs to the console.
First, set the logger. Probably in your environment/development.yml file:
Then, you can configure colors for the four debug levels:
warning: 'white on_yellow'
error: 'bold white on_red'
Check the colors/types supported in the Term::ANSIColor manual.
You can define regular expressions (and colors to be used) with:
- re: 'trying to match .*'
- re: 'request: .*'
By default, Dancer::Logger::ColorConsole makes some specific regular expressions colored. For instance, response: 200 are colored in green, while response: 404 are colored in red.
At the moment you can turn off these built-in regexps with: