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

Plack::Middleware::LogDispatch - Uses Log::Dispatch to configure logger

Author

       Tatsuhiko Miyagawa

Configuration

       logger
           Log::Dispatch object to send logs to. Required.

Description

       LogDispatch is a Plack::Middleware component that allows you to use Log::Dispatch to configure the
       logging object, "psgix.logger".

Name

       Plack::Middleware::LogDispatch - Uses Log::Dispatch to configure logger

See Also

       Log::Dispatch

       Plack::Middleware::Log4perl

perl v5.38.2                                       2024-01-20                Plack::Middleware::LogDispatch(3pm)

Synopsis

         use Log::Dispatch;

         my $logger = Log::Dispatch->new;
         $logger->add( Log::Dispatch::File->new(...) );
         $logger->add( Log::Dispatch::DesktopNotification->new(...) );

         builder {
             enable "LogDispatch", logger => $logger;
             $app;
         }

         # use with Log::Dispatch::Config
         use Log::Dispatch::Config;
         Log::Dispatch::Config->configure('/path/to/log.conf');

         builder {
             enable "LogDispatch", logger => Log::Dispatch::Config->instance;
             ...
         }

See Also