Filter::LevelRange(3)

πŸ’… NAME

ok so Log::Log4perl::Filter::LevelRange β€” it's a filter for a range of log levels. that's it, that's the vibe πŸŽ€


✨ SYNOPSIS ✨

log4perl.filter.Match1               = Log::Log4perl::Filter::LevelRange
log4perl.filter.Match1.LevelMin      = INFO
log4perl.filter.Match1.LevelMax      = ERROR
log4perl.filter.Match1.AcceptOnMatch = true

πŸ¦‹ DESCRIPTION πŸ¦‹

bestie listen. this Log4perl custom filter peeks at the current message and goes "hmm, does ur priority fall inside this predefined range?" it's giving bouncer at the club checking if ur on the list πŸ’…

the LevelMin and LevelMax parameters are literally the two ends of the window β€” they define the levels that mark the range of allowed message priorities. u pick from these, no substitutions:

  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL

and the defaults? iconic of them:

  • LevelMin defaults to DEBUG
  • LevelMax defaults to FATAL

so like, by default ur letting everything through. generous queen 🌈

then there's the extra parameter AcceptOnMatch β€” it decides whether the filter is supposed to pass the message or block it. u feed it true or false, simple as that. no cap.

fr fr, remember AcceptOnMatch is about accepting vs blocking on a match β€” don't skip it and then act surprised πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

  • Log::Log4perl::Filter
  • Log::Log4perl::Filter::Boolean
  • Log::Log4perl::Filter::LevelMatch
  • Log::Log4perl::Filter::MDC
  • Log::Log4perl::Filter::StringMatch

like, go read the whole filter family, they're all main characters πŸ’–


πŸ“œ LICENSE πŸ“œ

Copyright 2002-2013 by Mike Schilli <m@perlmeister.com> and Kevin Goess <cpan@goess.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. periodt. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

please contribute patches to the project on Github, they literally want ur code:

http://github.com/mschilli/log4perl

send bug reports or requests for enhancements to the authors via our

MAILING LIST (questions, bug reports, suggestions/patches): log4perl-devel@lists.sourceforge.net

Authors (please contact them via the list above, not directly): Mike Schilli <m@perlmeister.com>, Kevin Goess <cpan@goess.org>

Contributors (in alphabetical order): Ateeq Altaf, Cory Bennett, Jens Berthold, Jeremy Bopp, Hutton Davidson, Chris R. Donnelly, Matisse Enzer, Hugh Esco, Anthony Foiani, James FitzGibbon, Carl Franks, Dennis Gregorovic, Andy Grundman, Paul Harrington, Alexander Hartmaier David Hull, Robert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter, Brett Rann, Peter Rabbitson, Erik Selberg, Aaron Straup Cope, Lars Thegler, David Viner, Mac Yang.


ok that's the whole page bestie, go filter some logs πŸ’œ

🌸 cute lil sign-off: this was perl v5.42.0, dated 2022-10-22, and it lives at Filter::LevelRange(3) β€” slay ✨

πŸ“¦ where this page comes from