1Dancer2::Logger::CapturUes:e:rTrCaopn(t3r)ibuted Perl DoDcaunmceenrt2a:t:iLoongger::Capture::Trap(3)
2
3
4

NAME

6       Dancer2::Logger::Capture::Trap - a place to store captured Dancer2 logs
7

VERSION

9       version 0.300000
10

SYNOPSIS

12           my $trap = Dancer2::Logger::Capture::Trap->new;
13           $trap->store( $level, $message );
14           my $logs = $trap->read;
15

DESCRIPTION

17       This is a place to store and retrieve capture Dancer2 logs used by
18       Dancer2::Logger::Capture.
19
20   Methods
21       new
22
23       store
24
25           $trap->store($level, $message);
26
27       Stores a log $message and its $level.
28
29       read
30
31           my $logs = $trap->read;
32
33       Returns the logs stored as an array ref and clears the storage.
34
35       For example...
36
37           [{ level => "warning", message => "Danger! Warning! Dancer2!" },
38            { level => "error",   message => "You fail forever" }
39           ];
40

SEE ALSO

42       Dancer2::Logger::Capture
43

AUTHOR

45       Dancer Core Developers
46
48       This software is copyright (c) 2019 by Alexis Sukrieh.
49
50       This is free software; you can redistribute it and/or modify it under
51       the same terms as the Perl 5 programming language system itself.
52
53
54
55perl v5.30.1                      2020-01-29 Dancer2::Logger::Capture::Trap(3)
Impressum