.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Log::Any::Adapter::Util 3" .TH Log::Any::Adapter::Util 3 2024-09-01 "perl v5.40.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Log::Any::Adapter::Util \- Common utility functions for Log::Any .SH VERSION .IX Header "VERSION" version 1.717 .SH DESCRIPTION .IX Header "DESCRIPTION" This module has utility functions to help develop Log::Any::Adapter subclasses or Log::Any::Proxy formatters/filters. It also has some functions used in internal testing. .SH SUBROUTINES .IX Header "SUBROUTINES" .SS logging_methods .IX Subsection "logging_methods" Returns a list of all logging method. E.g. "trace", "info", etc. .SS detection_methods .IX Subsection "detection_methods" Returns a list of detection methods. E.g. "is_trace", "is_info", etc. .SS logging_and_detection_methods .IX Subsection "logging_and_detection_methods" Returns a list of logging and detection methods (but not aliases). .SS log_level_aliases .IX Subsection "log_level_aliases" Returns key/value pairs mapping aliases to "official" names. E.g. "err" maps to "error". .SS logging_aliases .IX Subsection "logging_aliases" Returns a list of logging alias names. These are the keys from "log_level_aliases". .SS detection_aliases .IX Subsection "detection_aliases" Returns a list of detection aliases. E.g. "is_err", "is_fatal", etc. .SS numeric_level .IX Subsection "numeric_level" Given a level name (or alias), returns the numeric value described above under log level constants. E.g. "err" would return 3. .SS dump_one_line .IX Subsection "dump_one_line" Given a reference, returns a one-line Data::Dumper dump with keys sorted. .SS make_method .IX Subsection "make_method" Given a method name, a code reference and a package name, installs the code reference as a method in the package. .SS "require_dynamic (DEPRECATED)" .IX Subsection "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. .SS "read_file (DEPRECATED)" .IX Subsection "read_file (DEPRECATED)" Slurp a file. Does *not* apply any layers. Used for testing and may become private in the future. .SS "cmp_deeply (DEPRECATED)" .IX Subsection "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. .SH USAGE .IX Header "USAGE" Nothing is exported by default. .SS "Log level constants" .IX Subsection "Log level constants" If the \f(CW\*(C`:levels\*(C'\fR tag is included in the import list, the following numeric constants will be imported: .PP .Vb 9 \& EMERGENCY => 0 \& ALERT => 1 \& CRITICAL => 2 \& ERROR => 3 \& WARNING => 4 \& NOTICE => 5 \& INFO => 6 \& DEBUG => 7 \& TRACE => 8 .Ve .SH AUTHORS .IX Header "AUTHORS" .IP \(bu 4 Jonathan Swartz .IP \(bu 4 David Golden .IP \(bu 4 Doug Bell .IP \(bu 4 Daniel Pittman .IP \(bu 4 Stephen Thirlwall .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2017 by Jonathan Swartz, David Golden, and Doug Bell. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.