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::Any::Adapter::Multiplex - Adapter to use allow structured logging across other adapters

Authors

• Jonathan Swartz <swartz@pobox.com> • David Golden <dagolden@cpan.org> • Doug Bell <preaction@cpan.org> • Daniel Pittman <daniel@rimspace.net> • Stephen Thirlwall <sdt@cpan.org>

Description

This built-in Log::Any adapter provides a simple means of routing logs to multiple other Log::Any::Adapters. Adapters receiving messages from this adapter can behave just like they are the only recipient of the log message. That means they can, for example, use "Structured logging" in Log::Any::Adapter::Development (or not). "adapters" is a hashref whose keys should be adapters, and whose values are the arguments to pass those adapters on initialization. Note that this differs from other loggers like Log::Dispatch, which will only provide its output modules a single string $message, and not the full "Log context data" in Log::Any.

Name

Log::Any::Adapter::Multiplex - Adapter to use allow structured logging across other adapters

See Also

Log::Any, Log::Any::Adapter

Synopsis

Log::Any::Adapter->set( 'Multiplex', adapters => { 'Stdout' => [], 'Stderr' => [ log_level => 'warn' ], ... $adapter => \@adapter_args }, );

Version

version 1.717

See Also