Log::ger::Format::Default(3pm)

Log::ger::Format::Default3pm

Use default log::ger formatting style

Usage

 use Log::ger::Format 'Default';
 use Log::ger;
 log_debug "Printed as is";
 # will format the log message as: Printed as is
 log_debug "Data for %s is %s", "budi", {foo=>'blah', bar=>undef};
 # will format the log message as: Data for budi is {bar=>undef,foo=>"blah"}

Version

version 0.042

Overview

This is the default Log::ger formatter, which: 1) passes the argument as-is if there is only a single argument; or, if there are more than one argument, 2) treats the arguments like sprintf(), where the first argument is the template and the rest are variables to be substituted to the conversions inside the template. In the second case, reference arguments will be dumped using Data::Dmp or Data::Dumper by default (but the dumper is configurable by setting $Log::ger::_dumper; see for example Log::ger::UseDataDump or Log::ger::UseDataDumpColor).

The same code is already included in Log::ger::Heavy; this module just repackages it so it's more reusable.

Author

perlancar <[email protected]>

From liblog-ger-perl 0.042-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.