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. 🫢


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