Log::An...er::Util(3)
π Log::Any::Adapter::Util(3) β the user-contributed Perl documentation page, but make it cute π
okay bestie, sit down, hydrate, and let me tell you about Log::Any::Adapter::Util β yes that's the manual page name, yes it's a whole mouthful, no we are not abbreviating it. it's giving "utility drawer in the kitchen that actually has everything you need." π
β¨ NAME β¨
Log::Any::Adapter::Util β common utility functions for Log::Any. that's it. that's the name. short, sweet, slays. π
πΈ VERSION πΈ
version 1.718 β¨
π¦ DESCRIPTION π¦
so this module is your little helper bestie. it's got utility functions to help you develop Log::Any::Adapter subclasses, or Log::Any::Proxy formatters/filters. and it also has some functions used in internal testing β like, the quiet ones that don't get a lot of attention but hold the whole group chat together. π«Ά
π SUBROUTINES π
π logging_methods
Returns a list of all logging method. E.g. "trace", "info", etc.
π detection_methods
Returns a list of detection methods. E.g. "is_trace", "is_info", etc.
π logging_and_detection_methods
Returns a list of logging and detection methods (but not aliases). no aliases invited to this party, sorry. π
π log_level_aliases
Returns key/value pairs mapping aliases to "official" names. E.g. "err" maps to "error". it's giving government name vs. nickname energy. π
π logging_aliases
Returns a list of logging alias names. These are the keys from log_level_aliases.
π detection_aliases
Returns a list of detection aliases. E.g. "is_err", "is_fatal", etc.
π numeric_level
Given a level name (or alias), returns the numeric value described above under log level constants. E.g. "err" would return 3. math but make it slay. β¨
π dump_one_line
Given a reference, returns a one-line Data::Dumper dump with keys sorted. tidy. organized. main character energy. π₯
π make_method
Given a method name, a code reference and a package name, installs the code reference as a method in the package.
π require_dynamic (DEPRECATED)
Given a class name, attempts to load it via require unless the class already has a constructor available. Throws an error on failure. Used internally and may become private in the future.
DEPRECATED alert bestie π¨ also heads up: this is used internally and it may become private in the future, so don't build your whole personality around it.
π read_file (DEPRECATED)
Slurp a file. Does not apply any layers. Used for testing and may become private in the future.
DEPRECATED, and also literally zero layers applied, okay? it's for testing and it may become private in the future.
π cmp_deeply (DEPRECATED)
Compares dump_one_line results for two references. Also takes a test label as a third argument. Used for testing and may become private in the future.
DEPRECATED π testing use only, and yep β it may become private in the future.
π USAGE π
Nothing is exported by default. like, nothing. you gotta ask. π
β Log level constants β
If the ":levels" tag is included in the import list, the following numeric constants will be imported:
EMERGENCY => 0
ALERT => 1
CRITICAL => 2
ERROR => 3
WARNING => 4
NOTICE => 5
INFO => 6
DEBUG => 7
TRACE => 8
no cap, those numbers are exact. EMERGENCY is 0, TRACE is 8, and everything in between is exactly as written above. π§
π AUTHORS π
- Jonathan Swartz
<swartz@pobox.com> - David Golden
<dagolden@cpan.org> - Doug Bell
<preaction@cpan.org> - Daniel Pittman
<daniel@rimspace.net> - Stephen Thirlwall
<sdt@cpan.org>
the whole squad. the avengers of Perl logging. π«Ά
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2017 by Jonathan Swartz, David Golden, and Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the page bestie!! π this was the user-contributed Perl documentation for Log::Any::Adapter::Util(3), generated by perl v5.42.0 on 2025-07-28. go forth and log responsibly. slay. β¨π
π¦
π¦ where this page comes from
- fedora 43: perl-Log-Any 1.718-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms