Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

Log::ger::Output::String - Set output to a string

Author

       perlancar <perlancar@cpan.org>

Configuration

string=>scalarref
       Required.

   formatter=>coderef
       Optional.

   append_newline=>bool(default:1)

Description

       For testing only.

Name

       Log::ger::Output::String - Set output to a string

Synopsis

        BEGIN { our $str }
        use Log::ger::Output 'String' => (
            string => \$str,
            # append_newline => 0, # default is true, to mimic Log::ger::Output::Screen
        );
        use Log::ger;

        log_warn "warn ...";
        log_error "debug ...";

       $str will contain "warn ...\n".

Version

       version 0.042

See Also