Catalyst::Plugin::Log::Log4perl - Catalyst plugin to initialize Log::Log4perl from the application's configuration
# in MyApp.pm use Catalyst qw( ConfigLoader Log::Log4perl ); use Log::Log4perl::Catalyst; ... __PACKAGE__->log( Log::Log4perl::Catalyst->new ); __PACKAGE__->setup; # in myapp.yaml name: MyApp Plugin::Log::Log4perl: conf: '__HOME__/log4perl.conf' watch_delay: 60 # optional
This module allows you to initialize Log::Log4perl within the application's configuration. This is especially useful when using Catalyst::Plugin::ConfigLoader to load configuration files. It is meant to be used in conjunction with Log::Log4perl::Catalyst, but can also be used stand-alone.
This will be passed directly to
Log::Log4perl->init(), so it can be anything that that method can support. This includes the name of a configuration file or a
HASH reference. See the Log::Log4perl documentation for more information.
If this is present,
Log::Log4perl->init_and_watch() is used for Log::Log4perl initialization with the given delay.
If Log::Log4perl::Catalyst is used, this module will re-initialize Log::Log4perl which is not recommended. This is unavoidable, though, since your application's logger is configured prior to running
jason hord <firstname.lastname@example.org>
Copyright (c) 2010-2014, jason hord
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.