1Log::ger::Output::StrinUgs(e3r)Contributed Perl DocumentLaotgi:o:nger::Output::String(3)
2
3
4
6 Log::ger::Output::String - Set output to a string
7
9 version 0.023
10
12 use var '$str';
13 use Log::ger::Output 'String' => (
14 string => \$str,
15 # append_newline => 0, # default is true, to mimic Log::ger::Output::Screen
16 );
17 use Log::ger;
18
19 log_warn "warn ...";
20 log_error "debug ...";
21
22 $str will contain "warn ...\n".
23
25 For testing only.
26
28 string => scalarref
29 Required.
30
31 formatter => coderef
32 Optional.
33
34 append_newline => bool (default: 1)
36 perlancar <perlancar@cpan.org>
37
39 This software is copyright (c) 2017 by perlancar@cpan.org.
40
41 This is free software; you can redistribute it and/or modify it under
42 the same terms as the Perl 5 programming language system itself.
43
44
45
46perl v5.28.0 2017-08-03 Log::ger::Output::String(3)