NAME
    Dancer::Logger::Log4perl - Dancer adapter for Log::Log4perl

VERSION
    version 0.7.0_01

SYNOPSIS
       # In your config.yml
       logger: log4perl
       log4perl:
          config_file: log4perl.conf

       # In your log4perl.conf
       log4perl.rootLogger              = DEBUG, LOG1
       log4perl.appender.LOG1           = Log::Log4perl::Appender::File
       log4perl.appender.LOG1.filename  = /var/log/mylog.log
       log4perl.appender.LOG1.mode      = append
       log4perl.appender.LOG1.layout    = Log::Log4perl::Layout::PatternLayout
       log4perl.appender.LOG1.layout.ConversionPattern = %d %p %m %n

DESCRIPTION
    This class is an interface between Dancer's logging engine abstraction
    layer and the Log::Log4perl library. In order to use it, you have to set
    the "logger" engine to "log4perl".

    You can use either Log::Log4perl or Log::Log4perl::Tiny. If you want to
    use the latter, just specify the "tiny" option in the specific
    configuration.

    You can decide to let the module perform the initialisation of the
    logging system, or you can do it by yourself. In the latter case, you
    can pass the "no_init" parameter, which instructs the module not to
    perform the initialisation.

    After initialisation, you can decide to use Dancer's functions or the
    ones provided by either Log::Log4perl or Log::Log4perl::Tiny, e.g. the
    stealth loggers in case of a simplified interface.

CONFIGURATION
    The configuration capabilities vary depending on the underlying library
    you have.

  Log::Log4perl
    If you're using standard Log::Log4perl, then you have two alternatives
    to pass a configuration:

    *   via a configuration file, using the "config_file" option:

           logger: log4perl
           log4perl:
              config_file: log4perl.conf

    *   via a straight configuration text, using the "config" option:

           logger: log4perl
           log4perl:
              config: |
                 log4perl.rootLogger              = DEBUG, LOG1
                 log4perl.appender.LOG1           = Log::Log4perl::Appender::File
                 log4perl.appender.LOG1.filename  = /var/log/mylog.log
                 log4perl.appender.LOG1.mode      = append
                 log4perl.appender.LOG1.layout    = Log::Log4perl::Layout::PatternLayout
                 log4perl.appender.LOG1.layout.ConversionPattern = %d %p %m %n

    You can also decide to perform the configuration phase by yourself,
    directly inside the program. In this case, the "no_init" option should
    come handy.

  Log::Log4perl::Tiny
    If all you have is Log::Log4perl::Tiny, you can set some parameters:

    *   the log "level"

    *   the log "format" (aliased to "layout" as well)

    Again, you can decide to perform your own initialisation, in which case
    it is adviseable to use the "no_init" option.

INTERFACE
  Logging Facilities
    new the object constructor.

    debug
    core
    warning
    error
        The four methods that a Dancer logger must have.

AUTHOR
    Flavio Poletti <polettix@cpan.org>

COPYRIGHT AND LICENSE
    Copyright (C) 2011 by Flavio Poletti polettix@cpan.org.

    This module is free software. You can redistribute it and/or modify it
    under the terms of the Artistic License 2.0.

    This program is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of
    merchantability or fitness for a particular purpose.

