Skip to content

"Adapter-modifying plugin" or "Proxy-modifying plugin"? #11

Description

@XSven

I am using the "Levels" plugin successfully in test scripts that test what I am logging with Log::Any. The involved module is Log::Any::Test that sets

$Log::Any::OverrideDefaultAdapterClass = 'Log::Any::Adapter::Test';
$Log::Any::OverrideDefaultProxyClass   = 'Log::Any::Proxy::Test';

at compile-time. Out of curiosity I took a closer look at the Log::Any::Plugin implementation. This line

my $adapter_class = ref Log::Any->get_logger(category => caller());

looks questionable because Log::Any->get_logger() isn't an adapter class object but a proxy class object. In my use case $adapter_class has the value 'Log::Any::Proxy::Test'! If this is true in gerenal the whole Log::Any::Plugin documentations seems to be incorrect because the plugins don't modify adapters but proxies! The reason for this inaccuracy might be the 1.00 change of Log::Any at the end of 2014

  • Logging now goes via a Log::Any::Proxy object instead of directly to an adapter. This allows easy customization of the message production.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions