

253 - logcat - a new look at logging with Piwai from Square
9 snips Dec 10, 2024
Pierre-Yves Ricau, an Android developer at Square and creator of the logcat library, joins to discuss innovative logging strategies. He outlines the origins and advantages of logcat, comparing it with the popular Timber library. The conversation dives into the performance implications of logging practices and strategies for optimizing log usage in production. Pierre-Yves also emphasizes the importance of community contributions in open-source projects and shares insights on streamlining logging for better developer experience.
AI Snips
Chapters
Books
Transcript
Episode notes
Logcat's Origin
- PY initially resisted writing Logcat, believing Timber was sufficient.
- Square's internal logging practices, using format strings and placeholders, worked well until Kotlin and string interpolation led to performance issues.
Kotlin's String Interpolation Issues
- Kotlin's string interpolation, while convenient, can cause performance problems in logging.
- String interpolation with data classes can lead to large object serialization, impacting performance.
Timber's Debug Tree Performance
- Square enabled Timber in some production devices for enhanced debugging.
- The debug tree's automatic tag generation, relying on stack traces, caused performance issues in Timber.