find-non-lambda-logs
Installation
SKILL.md
Find Non-Lambda Log Calls
Overview
Three related logging hygiene issues:
- Lambda overload missing.
Log.d/i/w/ecalls that use string interpolation without the lambda overload waste string allocation when the log level is filtered out in release builds. - Throwable dropped in catch blocks.
Log.w/ecalls insidecatch (e: ...)blocks that interpolate${e.message}but don't passelose the stack trace, and log nothing useful whene.messageis null (NPE, IOException with no message, etc.). - Still on
android.util.Log. Files importing the platform logger bypassLog.minLeveland theLogSink, and have no lambda overload — so neither fix above can be applied to them. Step 0 finds these; the last section migrates them.
When to Use
- After merging branches that add new logging
- Periodic audit of logging hygiene
- After migrating
android.util.Logusages to the sharedLogwrapper
What to Flag
Calls with string interpolation ($ in message) that do not pass a throwable: