AAkira / Napier

Logging library for Kotlin Multiplatform
Apache License 2.0
820 stars 36 forks source link

Avoid unnecessary lambda calculations when logging is disabled #126

Open neikist opened 4 months ago

neikist commented 4 months ago

If we even have all log levels disabled, the lambda for the message is still calculated. This affects performance and memory consumption. We can add a second log method with a lambda argument instead of a string message and evaluate this lambda only if necessary.

matbadev commented 4 months ago

This would be fixed with #114 but that PR is already open for more than one year 🤔

kasem-sm commented 3 months ago

Any updates on this?