1Log::Any::Adapter::MultUispelrexC(o3n)tributed Perl DocuLmoegn:t:aAtniyo:n:Adapter::Multiplex(3)
2
3
4
6 Log::Any::Adapter::Multiplex - Adapter to use allow structured logging
7 across other adapters
8
10 version 1.708
11
13 Log::Any::Adapter->set(
14 'Multiplex',
15 adapters => {
16 'Stdout' => [],
17 'Stderr' => [ log_level => 'warn' ],
18 ...
19 $adapter => \@adapter_args
20 },
21 );
22
24 This built-in Log::Any adapter provides a simple means of routing logs
25 to multiple other Log::Any::Adapters.
26
27 Adapters receiving messages from this adapter can behave just like they
28 are the only recipient of the log message. That means they can, for
29 example, use "Structured logging" in Log::Any::Adapter::Development (or
30 not).
31
32 "adapters" is a hashref whose keys should be adapters, and whose values
33 are the arguments to pass those adapters on initialization.
34
35 Note that this differs from other loggers like Log::Dispatch, which
36 will only provide its output modules a single string $message, and not
37 the full "Log context data" in Log::Any.
38
40 Log::Any, Log::Any::Adapter
41
43 · Jonathan Swartz <swartz@pobox.com>
44
45 · David Golden <dagolden@cpan.org>
46
47 · Doug Bell <preaction@cpan.org>
48
49 · Daniel Pittman <daniel@rimspace.net>
50
51 · Stephen Thirlwall <sdt@cpan.org>
52
54 This software is copyright (c) 2017 by Jonathan Swartz, David Golden,
55 and Doug Bell.
56
57 This is free software; you can redistribute it and/or modify it under
58 the same terms as the Perl 5 programming language system itself.
59
60
61
62perl v5.32.0 2020-07-28 Log::Any::Adapter::Multiplex(3)