preaction / Log-Any

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

Add early-return if log level is disabled #70

Closed mephinet closed 6 years ago

mephinet commented 6 years ago

Using the optimization that is already performed in the f version of the log methods, to the non-f functions: if the log level in question is not active, and the return value of the log method is not evaluated, there's no need to do any processing here. This should result in a performance optimization without any downsides. Solves https://github.com/preaction/Log-Any/issues/69

preaction commented 6 years ago

Thanks!