Log::g...Default(3pm)
π Log::ger::Format::Default π
okay bestie, gather round, because we're talking about the default formatting style for Log::ger β aka the thing that makes your log messages look cute without you lifting a finger. no cap, it's giving "effortless". β¨
πΈ NAME πΈ
Log::ger::Format::Default β literally just Use default Log::ger formatting style. that's it, that's the whole vibe. π
β VERSION β
this one is version 0.042 π
π¦ SYNOPSIS π¦
here's the whole thing in action, copy-paste ready:
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"}
see how the second one just ate? the hashref got dumped and sorted and everything. obsessed. π₯
π DESCRIPTION π
so, this is the default Log::ger formatter, and here's exactly what it does β two moods, pick your fighter:
- if there's only a single argument, it passes that argument as-is. no touchy. no formatting. just vibes. π
- if there's more than one argument, it treats them like
sprintf(), where the first argument is the template and the rest are the variables to be substituted into the conversions inside the template. main character energy, honestly.
and in that second case? reference arguments get dumped using Data::Dmp or Data::Dumper by default β but listen, the dumper is configurable, you just set $Log::ger::_dumper. iykyk. π want examples of swapping it out? go peek at Log::ger::UseDataDump or Log::ger::UseDataDumpColor.
π‘ also fun fact: the same code is already included in Log::ger::Heavy. this module just repackages it so it's more reusable. it's the same slay, new packaging. π«Ά
π§ SEE ALSO π§
- Log::ger::Format::Join
- Log::ger
β¨ AUTHOR β¨
perlancar <perlancar@cpan.org> β ty bestie for your service π«‘π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2023, 2022, 2020, 2019, 2018, 2017 by perlancar <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.
and that's the whole page, bestie. perl v5.38.2, dated 2024-05-25, and yes β the header up top literally says Log::g...Default(3pm) because manpage truncation said "we're not finishing that word today". iconic behavior. ππΈ go forth and format your logs. periodt. π
π¦ where this page comes from
- debian trixie: liblog-ger-perl 0.042-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liblog-ger-perl 0.042-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liblog-ger-perl 0.042-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms