preaction / Log-Any

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

Expose Manager->get_adapter as Adapter->get - #69 #78

Closed nrdvana closed 5 years ago

nrdvana commented 5 years ago

Making the get_adapter method public allows other logging systems to build on Log::Any's multiplexing capability without reaching into the inner workings.

Unrelated to my other pull request, this is a tiny change I'd like available in the API, previously discussed in issue #69. Feel free to disregard it if you don't want it in the public API.

preaction commented 5 years ago

I like this: I've been slightly uncomfortable with the indirection introduced by the Log::Any::Manager. This looks like a step on the path to moving adapter management into the Log::Any::Adapter class itself, which seems more logical to me: Rather than having to go from Log::Any::Adapter to Log::Any to Log::Any::Manager to see how adapters are selected, it'd all be in the one module. That might not actually be possible, but it's enough to merge this PR :)

Thanks!