preaction / Log-Any

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

Log::Any->has_consumer() is unspecific #89

Open XSven opened 2 years ago

XSven commented 2 years ago

If I understand it correctly it is possible to set an adapter only for a certain category

https://metacpan.org/pod/Log::Any::Adapter#category

How can I check that a given (specific) category has a corresponding adapter (consumer). I think

Log::Any->has_consumer()

does not offer this yet?!

preaction commented 1 year ago

I'm not sure if that's going to be possible: If a category doesn't have a specific adaptor, it would get the generic adaptor (if set). If you don't set a fallback, generic adaptor, then Log::Any::Manager->get_adaptor would return the Null adaptor, which does nothing. You might be able to detect it that way.