File: LogCallback.pl

package info (click to toggle)
libsearch-elasticsearch-client-1-0-perl 6.81-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 444 kB
  • sloc: perl: 2,788; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 291 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use Log::Any::Adapter::Callback 0.09;
use Log::Any::Adapter;

our ( $method, $format );
Log::Any::Adapter->set(
    'Callback',
    min_level  => 'trace',
    logging_cb => sub {
        ( $method, undef, $format ) = @_;
    },
    detection_cb => sub {
        $method = shift;
    }
);

1