# Log::Any::Adapter::Multiplex - Adapter to use allow structured logging ... - perldoc - [phpMan]

## NAME
    [Log::Any::Adapter::Multiplex](https://www.chedong.com/phpMan.php/perldoc/Log%3A%3AAny%3A%3AAdapter%3A%3AMultiplex/markdown) - Adapter to use allow structured logging across other adapters

## VERSION
    version 1.717

## SYNOPSIS
        [Log::Any::Adapter](https://www.chedong.com/phpMan.php/perldoc/Log%3A%3AAny%3A%3AAdapter/markdown)->set(
            'Multiplex',
            adapters => {
                'Stdout' => [],
                'Stderr' => [ log_level => 'warn' ],
                ...
                $adapter => \@adapter_args
            },
        );

## DESCRIPTION
    This built-in [Log::Any](https://www.chedong.com/phpMan.php/perldoc/Log%3A%3AAny/markdown) adapter provides a simple means of routing logs to multiple other
    [Log::Any::Adapters](https://www.chedong.com/phpMan.php/perldoc/Log%3A%3AAny%3A%3AAdapters/markdown).

    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](https://www.chedong.com/phpMan.php/perldoc/Log%3A%3AAny%3A%3AAdapter%3A%3ADevelopment/markdown) (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](https://www.chedong.com/phpMan.php/perldoc/Log%3A%3ADispatch/markdown), which will only provide its output
    modules a single string $message, and not the full "Log context data" in [Log::Any](https://www.chedong.com/phpMan.php/perldoc/Log%3A%3AAny/markdown).

## SEE ALSO
    [Log::Any](https://www.chedong.com/phpMan.php/perldoc/Log%3A%3AAny/markdown), [Log::Any::Adapter](https://www.chedong.com/phpMan.php/perldoc/Log%3A%3AAny%3A%3AAdapter/markdown)

## 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>>

## COPYRIGHT AND LICENSE
    This software is copyright (c) 2017 by Jonathan Swartz, David Golden, and Doug Bell.

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

