package Log::ger::Manual::Tutorial::700_Layout;

# DATE
# VERSION

1;
# ABSTRACT: Layout plugins

__END__

=pod

=encoding UTF-8

=head1 NAME

Log::ger::Manual::Tutorial::700_Layout - Layout plugins

=head1 VERSION

version 0.033.000

=head1 DESCRIPTION

=over

=item * L<Log::ger::Manual::Tutorial::790_WritingALayoutPlugin>

=back

=head1 WHAT IS A LAYOUT PLUGIN?

A layout plugin provides code to modify a log message (usually decorate, add
more information) after it is formatted by the formatter. This functionality is
separated from formatter plugin for more flexibility.

Most of the time, the layout plugin that you might want to use is
L<Log::ger::Layout::Pattern>. This plugin is similar to the pattern layout
module L<Log::Log4perl::Layout::PatternLayout> in L<Log::Log4perl>. In fact,
most of the placeholders follow the Log4perl version. This plugin lets you add
extra information like timestamp, PID, category name, level name, and so on to
the log message, aside from the log message itself.

For example:

 use Log::ger::Layout Pattern => (format => '[%d][%c]%% %m');
 use Log::ger::Output 'Screen';
 use Log::ger;

 log_warn("a warning");

will print something like:

 [2017-08-03T14:51:18][main]% a warning

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 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.

=cut