Closed dallaylaen closed 6 years ago
This reminds me of the issue I had when first implementing the $LOG_ANY_DEFAULT_ADAPTER environment variable, and that I fixed with 3d5ee5cfc5f91e26d865288547972b8372bdb219. In your case, too, $log is an instance of Log::Any::Proxy::Null - which is not correct. Fortunately for me, the issue is still present when I test it with Log::Any version 1.049, so I'm not to blame. phew
I guess the issue here is that Log::Any::get_logger
first calls _get_proxy_class
(when has_consumer
is still false, resulting in the Null proxy) and only then processes the default_adapter
parameter. If the order is changed, your example code works...
Oh, so it's actually a bug and not me misreading the doc?
Submitted #66 then.
Fixed by #66
Released in v1.702
I've tried using the
default_adapter
option according to the documentation and it doesn't do what I expect it to. The following is a minimal isolated example:Expected result: a message mentioning Foobared.
Actual result: Empty.
What am I doing wrong?