Skip to content

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

Description

@turnipdabeets

Summary

Today, PostHog Logs on iOS 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:

PostHogSDK.shared.logger?.info("checkout completed", attributes: ["order_id": "ord_789"])

The following are not captured automatically: os_log / Logger, print, and NSLog.

Proposed behavior

An opt-in config flag (e.g. logs.autocaptureNativeLogs = true) that hooks into os_log / Logger, print, and NSLog 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions