GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Log::ger::Format::Default(3) User Contributed Perl Documentation Log::ger::Format::Default(3)

Log::ger::Format::Default - Use default Log::ger formatting style

version 0.038

 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"}

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.

Log::ger::Format::Join

Log::ger

perlancar <perlancar@cpan.org>

This software is copyright (c) 2021, 2020, 2019, 2018, 2017 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2021-01-31 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.