Log::Log4perl::Filter::CallerMatch - Filter Log4perl messages based on call frames
version 1.200
This Log4perl custom filter checks the call stack using caller() and filters the subroutine and package using user-provided regular expressions. You can specify a specific call frame to test against, or have the filter iterate through a range of call frames.
A perl5 regular expression, matched against the log message.
Defines if the filter is supposed to pass or block the message on a match (true or false).
true
false
A perl5 regular expression, matched against the 1st item in the array returned by caller() (e.g. "package")
A perl5 regular expression, matched against the 4th item in the array returned by caller() (e.g. "subroutine")
The call frame to use when requesting information from caller(). (e.g. $i in caller($i)
The first call frame tested against when iterating through a series of call frames. Ignored if CallFrame specified.
The last call frame tested against when iterating through a series of call frames. Ignored if CallFrame specified.
Constructor. Refer to Log::Log4perl::Filter for more information
Decides whether log message should be accepted or not. Refer to Log::Log4perl::Filter for more information
# log.conf log4perl.logger = ALL, A1 log4perl.appender.A1 = Log::Log4perl::Appender::TestBuffer log4perl.appender.A1.Filter = MyFilter log4perl.appender.A1.layout = Log::Log4perl::Layout::SimpleLayout log4perl.filter.MyFilter = Log::Log4perl::Filter::CallerMatch log4perl.filter.MyFilter.SubToMatch = WebGUI::Session::ErrorHandler log4perl.filter.MyFilter.PackageToMatch = Flux:: log4perl.filter.MyFilter.StringToMatch = Operand1
Log::Log4perl::Filter, Log::Log4perl::Filter::StringMatch, Log::Log4perl::Filter::LevelMatch, Log::Log4perl::Filter::LevelRange, Log::Log4perl::Filter::Boolean
Patrick Donelan <pdonelan@cpan.org>
This software is copyright (c) 2010 by Patrick Donelan.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Log::Log4perl::Filter::CallerMatch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Log4perl::Filter::CallerMatch
CPAN shell
perl -MCPAN -e shell install Log::Log4perl::Filter::CallerMatch
For more information on module installation, please visit the detailed CPAN module installation guide.