logcat
Logcat is a lightweight Kotlin logging library from Square that wraps Android's native Log class with a minimal, intuitive API. It prioritizes performance by deferring string interpolation via lambdas and uses class context introspection instead of stack traces to auto-tag logs.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | square/logcat |
| Owner | square |
| Primary language | Kotlin |
| License | Apache-2.0 — OSI-approved |
| Stars | 986 |
| Forks | 20 |
| Open issues | 5 |
| Latest release | v0.4 (2025-07-29) |
| Last updated | 2026-01-20 |
| Source | https://github.com/square/logcat |
What logcat is
Provides an inlined extension function on Any that accepts optional priority and tag parameters plus a lazy string-producing lambda. Integrates via AndroidLogcatLogger.installOnDebuggableApp() and supports exception logging through Throwable.asLog(). Defaults to DEBUG priority and auto-derives tag from calling class name without stacktrace overhead.
Get the logcat source
Clone the repository and explore it locally.
git clone https://github.com/square/logcat.gitcd logcat# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Installation requires Application.onCreate() setup via AndroidLogcatLogger.installOnDebuggableApp(); must specify minPriority and pass application context.
- Logging from standalone functions (no `this` receiver) requires explicit tag parameter via the alternate overload; default auto-tag only works in class/object contexts.
- Exception logging uses Throwable.asLog() extension method rather than direct throwable parameters; developers must remember to call this explicitly.
- Priority defaults to DEBUG; INFO, WARN, ERROR must be passed as parameters; no static convenience methods (e.g. logcat.info()) are provided.
- Tag derivation uses outermost simple class name (last `.` to first `$`); inner classes and anonymous classes may not produce expected tag strings.
When to avoid it — and what to weigh
- Requiring multi-destination or remote log aggregation — The library explicitly discourages remote logging via custom loggers. If you need Elasticsearch, Datadog, or Splunk integration, choose a more feature-complete framework.
- Building non-Android applications — Logcat depends on Android's Log class and AndroidLogcatLogger. It is not applicable to server, desktop, or iOS projects.
- Needing structured logging or field-based context propagation — This library produces string-only logs without built-in support for JSON, key-value pairs, or MDC/correlation IDs common in enterprise logging.
- Projects using Java exclusively without Kotlin adoption — While callable from Java, the API (inline extension functions, lambda syntax) is optimized for Kotlin and will be cumbersome in Java codebases.
License & commercial use
Licensed under Apache License 2.0 (Apache-2.0), a permissive OSI-approved license. Permits commercial use, modification, and distribution with proper attribution and liability disclaimer.
Apache-2.0 is a permissive open-source license that explicitly permits commercial use. No commercial restrictions, proprietary clauses, or dual licensing are present. Use in proprietary Android applications is allowed; attribution is required in derivative works.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
No explicit security guidance in documentation. Developers must ensure logged data does not contain sensitive information (passwords, tokens, PII); logs are written to local logcat and may be accessible via ADB depending on device configuration. No encryption or redaction facilities are built in. Review your logging calls for information leakage before release builds.
Alternatives to consider
Timber (JakeWharton)
More feature-rich with multiple tree implementations (DebugTree, ReleaseTree), better suited for complex logging scenarios; higher API surface but added overhead from stacktrace-based tagging.
SLF4J with Android bindings
Industry-standard facade supporting multiple backends and structured logging; better for enterprise or multi-platform projects, but heavier footprint and more complex configuration.
Android's native android.util.Log
Zero dependencies, built-in to framework; requires manual priority/tag management and offers no lazy evaluation, but suitable for minimal or proto logging.
Build on logcat with DEV.co software developers
Our experts can assess whether Logcat fits your logging strategy, compare it against Timber or SLF4J, and help you integrate it safely into your codebase.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
logcat FAQ
Does logcat() support remote logging to Datadog or Splunk?
What is the performance impact of lambda-based logging?
Can I use logcat in Java projects?
How do I set different log levels for different modules?
Work with a software development agency
From first prototype to production, DEV.co delivers software development services around tools like logcat. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source observability and beyond.
Evaluating Logcat for your Android team?
Our experts can assess whether Logcat fits your logging strategy, compare it against Timber or SLF4J, and help you integrate it safely into your codebase.