1Dancer::Logger::CaptureU:s:eTrraCpo(n3t)ributed Perl DocDuamnecnetra:t:iLoongger::Capture::Trap(3)
2
3
4
6 Dancer::Logger::Capture::Trap - a place to store captured Dancer logs
7
9 version 1.3513
10
12 my $trap = Dancer::Logger::Capture::Trap->new;
13 $trap->store( $level, $message );
14 my $logs = $trap->read;
15
17 This is a place to store and retrieve capture Dancer logs used by
18 Dancer::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! Dancer!" },
38 { level => "error", message => "You fail forever" }
39 ];
40
42 Dancer::Logger::Capture
43
45 Dancer Core Developers
46
48 This software is copyright (c) 2010 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.32.0 2020-07-28 Dancer::Logger::Capture::Trap(3)