NAME

Dancer::Logger::ColorConsole - colored console-based logging engine for Dancer

SYNOPSIS

DESCRIPTION

This is a colored console-based logging engine that prints your logs to the console.

CONFIGURATION

First, set the logger. Probably in your environment/development.yml file:

logger: colorConsole

Then, you can configure colors for the four debug levels:

engines:
  logger:
    levels:
      core: 'red'
      warning: 'white on_yellow'
      debug: 'clear'
      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:

engines:
  logger:
    regexps:
      - re: 'trying to match .*'
        color: 'green'
      - re: 'request: .*'
        color: 'bold'

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:

engines:
  logger:
    default_regexps: 0

AUTHOR

Alberto Simões

LICENSE AND COPYRIGHT

Copyright 2011 Alberto Simões

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.