preaction / Log-Any

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

Native global log level filter #87

Open mattias-p opened 2 years ago

mattias-p commented 2 years ago

It would be really nice if Log::Any had its own global log level filter. So that messages were filtered before even being propagated to the adapters.

This way it would be convenient to just expose the Log::Any level names in your application's log level configuration interface. When requirements change for your application and you need to switch to a different log adapter, the migration experience would be much nicer.

Also, the Log::Any documentation advertises the ability to attach multiple adapters. If you do that today, you need to configure the level filters for all your adapters. And if the adapters have different sets of level names you need to do some busywork to get them in line with each other in your application. A single global level filter would be really nice in this situation too.