NAME

Dancer::Logger::LogAny - Use Log::Any to control logging from your Dancer app

VERSION

version 0.003

DESCRIPTION

This module implements a logger engine that send log messages through Log::Any.

CONFIGURATION

Using Dancer::Logger::LogAny

The setting logger should be set to LogAny in order to use this logger engine in a Dancer application.

Setting the category

If you provide Dancer::Logger::LogAny with a category, it will use that for any logging done through the Dancer logging functions, like so:

LogAny:
  category: Wombats

Setting the logger

Dancer::Logger::LogAny lets you do very simple configuration of the logger from your config files---simply encode the parameters for Log::Any::Adapter->set as an array named logger, like so:

LogAny:
  logger:
    - Syslog
    - name
    - 'my-web-app'

For more sophisticated usage, you may wish to use Log::Any::Adapter->set directly.

METHODS

init()

The init method is called by Dancer when creating the logger engine with this class. It will initiate a Log::Any logger using the possibly supplied category.

DEPENDENCY

This module depends on Log::Any.

AUTHOR

Michael Alan Dorman <mdorman@ironicdesign.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Michael Alan Dorman.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.