DOKK / manpages / debian 13 / liblog-ger-perl / Log::ger::Util.3pm.en
Log::ger::Util(3pm) User Contributed Perl Documentation Log::ger::Util(3pm)

Log::ger::Util - Utility routines for Log::ger

version 0.042

This package is created to keep Log::ger as minimalist as possible.

None of these functions are exported.

Usage:

 my $num = Log::ger::Util::numeric_level($level);

If given a non-negative integer, will return the number as-is. Otherwise will convert the argument, assumed to be a string level, to the associated numeric level. Will die on failure.

Usage:

 my $str_level = Log::ger::Util::string_level($level);

If given a known string level, will return the string as-is. Otherwise will convert the argument, assumed to be a number, to the associated string level. Will die on failure.

Usage:

 Log::ger::Util::set_level($level);

Set log level to $level, which can be a string or numeric level. Will die on failure.

perlancar <perlancar@cpan.org>

This software is copyright (c) 2023, 2022, 2020, 2019, 2018, 2017 by perlancar <perlancar@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2024-05-25 perl v5.38.2