Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
XSven opened this issue Sep 9, 2022 · 1 comment
Open

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

XSven opened this issue Sep 9, 2022 · 1 comment

Comments

@XSven
Copy link
Contributor

XSven commented Sep 9, 2022

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants