preaction / Log-Any

Simple, fast Perl logging API compatible with any logging system
Other
13 stars 19 forks source link

Allow creating Stderr, Stdout, or File adapter with "log_level => 'critical'" #74

Closed alabamapaul closed 6 years ago

alabamapaul commented 6 years ago

Because "critical" has a numeric value of 0, we have to test if the $numeric_level is defined rather than TRUE. Arguable a contrived situation, and no one is likely to set the minimum log_level to "critical" but I discovered this during some testing and thought I'd provide a patch.

preaction commented 6 years ago

This is indeed a bug, and is indeed the correct fix, thanks! But, could you add a test to make sure we don't regress? Otherwise, I can handle that if you'd like. These would be added to the t/filescreen.t test script.

preaction commented 6 years ago

I added some tests, and the tests revealed some more instances that needed fixing. This is released to CPAN in v1.706. Thanks for the patch!