The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Log::ger::Layout::Pattern - Pattern layout

VERSION

version 0.009

SYNOPSIS

 use Log::ger::Layout 'Pattern', format => '%d (%F:%L)> %m';
 use Log::ger;

DESCRIPTION

Known placeholder in format string:

 %c Category of the logging event
 %C Fully qualified package (or class) name of the caller
 %d Current date in ISO8601 format (YYYY-MM-DD<T>hh:mm:ss) (localtime)
 %D Current date in ISO8601 format (YYYY-MM-DD<T>hh:mm:ss) (GMT)
 %F File where the logging event occurred
 %H Hostname (if Sys::Hostname is available)
 %l Fully qualified name of the calling method followed by the
    callers source the file name and line number between
    parentheses.
 %L Line number within the file where the log statement was issued
 %m The message to be logged
 %M Method or function where the logging request was issued
 %n Newline (OS-independent)
 %p Level ("priority")of the logging event
 %P pid of the current process
 %r Number of seconds elapsed from program start to logging event
 %R Number of seconds elapsed from last logging event to current
    logging event
 %T A stack trace of functions called
 %% A literal percent (%) sign

 %_{vmsize}  Process virtual memory size, in KB.
    Currently works on Linux only. Value is cached for 1 second.

CONFIGURATION

format

packages_to_ignore

Regex or arrayref. When producing caller or stack trace information, will pass this to Devel::Caller::Util's caller() or callers().

subroutines_to_ignore

Regex or arrayref. When producing caller or stack trace information, will pass this to Devel::Caller::Util's caller() or callers().

SEE ALSO

Log::ger::Layout::Pattern::Multiline

Modelled after Log::Log4perl::Layout::PatternLayout but note that full compatibility or feature parity is not a goal. See also Log::Log4perl::Tiny.

Log::ger

Log::ger::Layout::LTSV

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2024, 2021, 2020, 2019, 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.