Skip to content

Feature request: autocapture native logs (gauging interest ๐Ÿ‘)ย #586

Description

@turnipdabeets

Summary

Today, PostHog Logs on Android is manual capture only โ€” you emit logs explicitly via captureLog(...) / the logger API. The SDK does not automatically capture the platform's native log streams.

We're considering adding autocapture for native logs so existing logging "just works" with zero extra instrumentation, and we'd like to gauge how much demand there is before building it.

๐Ÿ‘ this issue if you'd use it. Comments about your use case are even more helpful.

Current behavior

Logs are only sent when you call them yourself:

PostHog.logger.info("checkout completed", mapOf("order_id" to "ord_789"))

The following are not captured automatically: android.util.Log (Logcat) and Timber.

Proposed behavior

An opt-in config flag (e.g. logs.autocaptureNativeLogs = true) that hooks into android.util.Log (Logcat) and Timber and forwards them as PostHog log records โ€” respecting the existing severity mapping, beforeSend redaction, rate cap, and resource attributes.

Related issues (other SDKs)

Same proposal is being tracked across our mobile SDKs:

Posted by the mobile SDK team to gauge interest โ€” not yet scheduled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions