1Log::ger::Format::DefauUlste(r3)Contributed Perl DocumenLtoagt:i:ogner::Format::Default(3)
2
3
4
6 Log::ger::Format::Default - Use default Log::ger formatting style
7
9 version 0.037
10
12 use Log::ger::Format 'Default';
13 use Log::ger;
14
15 log_debug "Printed as is";
16 # will format the log message as: Printed as is
17
18 log_debug "Data for %s is %s", "budi", {foo=>'blah', bar=>undef};
19 # will format the log message as: Data for budi is {bar=>undef,foo=>"blah"}
20
22 This is the default Log::ger formatter, which: 1) passes the argument
23 as-is if there is only a single argument; or, if there are more than
24 one argument, 2) treats the arguments like sprintf(), where the first
25 argument is the template and the rest are variables to be substituted
26 to the conversions inside the template. In the second case, reference
27 arguments will be dumped using Data::Dmp or Data::Dumper by default
28 (but the dumper is configurable by setting $Log::ger::_dumper; see for
29 example Log::ger::UseDataDump or Log::ger::UseDataDumpColor).
30
31 The same code is already included in Log::ger::Heavy; this module just
32 repackages it so it's more reusable.
33
35 Log::ger::Format::Join
36
37 Log::ger
38
40 perlancar <perlancar@cpan.org>
41
43 This software is copyright (c) 2020, 2019, 2018, 2017 by
44 perlancar@cpan.org.
45
46 This is free software; you can redistribute it and/or modify it under
47 the same terms as the Perl 5 programming language system itself.
48
49
50
51perl v5.32.0 2020-07-28 Log::ger::Format::Default(3)