logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Log::Dispatch::Configurator::AppConfig - Configurator implementation with AppConfig

Author

       Tatsuhiko Miyagawa <miyagawa@bulknews.net>

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

Description

       Log::Dispatch::Configurator::AppConfig is an implementation of Log::Dispatch::Configurator using
       AppConfig format. Here is a sample of config file.

         dispatchers = file screen

         file.class = Log::Dispatch::File
         file.min_level = debug
         file.filename = /path/to/log
         file.mode = append
         file.format = [%d] [%p] %m at %F line %L%n

         screen.class = Log::Dispatch::Screen
         screen.min_level = info
         screen.stderr = 1
         screen.format = %m

       You can use ini style grouping.

         [file]
         class = Log::Dispatch::File
         min_level = debug

         [screen]
         class = Log::Dispatch::Screen
         min_level = info

       If you use _ (underscore) in dispatcher name, something very bad may happen. It is safe when you avoid
       doing so.

Name

       Log::Dispatch::Configurator::AppConfig - Configurator implementation with AppConfig

See Also

       Log::Dispatch::Config, AppConfig

perl v5.34.0                                       2022-06-15             Log::Dispatch::...ator::AppConfig(3pm)

Synopsis

         use Log::Dispatch::Config;
         use Log::Dispatch::Configurator::AppConfig;

         my $config = Log::Dispatch::Configurator::AppConfig->new('log.cfg');
         Log::Dispatch::Config->configure($config);

         # nearby piece of code
         my $log = Log::Dispatch::Config->instance;

See Also