.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 3pm" .TH Log::Any::Adapter::Util 3pm "2023-09-03" "perl v5.36.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. \*(L"trace\*(R", \*(L"info\*(R", etc. .SS "detection_methods" .IX Subsection "detection_methods" Returns a list of detection methods. E.g. \*(L"is_trace\*(R", \*(L"is_info\*(R", 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 \*(L"official\*(R" names. E.g. \*(L"err\*(R" maps to \*(L"error\*(R". .SS "logging_aliases" .IX Subsection "logging_aliases" Returns a list of logging alias names. These are the keys from \&\*(L"log_level_aliases\*(R". .SS "detection_aliases" .IX Subsection "detection_aliases" Returns a list of detection aliases. E.g. \*(L"is_err\*(R", \*(L"is_fatal\*(R", 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. \*(L"err\*(R" 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 (\s-1DEPRECATED\s0)" .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 (\s-1DEPRECATED\s0)" .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 (\s-1DEPRECATED\s0)" .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.