logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

       perlancar <perlancar@cpan.org>

Description

       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.

Name

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

See Also

       Log::ger::Format::Join

       Log::ger

Synopsis

        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

See Also