Skip to content

Excessive debug logs on Android (ClerkLog flooding Logcat) #567

@lucasdidur

Description

@lucasdidur

When integrating Clerk on Android, the SDK is flooding Logcat with a high volume of debug logs (ClerkLog), even when debug mode is expected to be disabled.

The logs are being emitted continuously (every few seconds), mainly related to token fetching and cache validation.

Example logs:


ClerkLog D Fetching token for session ...
ClerkLog D Found cached token for session ...
ClerkLog D Cached token is still valid ...

Full example:

2026-03-22 12:49:57.031 ClerkLog D Fetching token for session ...
2026-03-22 12:49:57.032 ClerkLog D Found cached token ...
2026-03-22 12:49:57.038 ClerkLog D Cached token is still valid ...
(repeats every ~5 seconds)


Expected behavior

  • Debug logs should be disabled or significantly reduced in production/non-debug mode
  • The debug flag (if provided in initialization) should effectively control log verbosity
  • Background token refresh should not produce constant visible logs

Actual behavior

  • Logs are emitted continuously regardless of debug configuration
  • No apparent way to silence or reduce ClerkLog output
  • Log frequency suggests periodic token checks (~every 5 seconds)

Environment

  • Platform: Android
  • Integration: Kotlin Multiplatform (KMP)
  • Clerk SDK version: (fill here)
  • Device: (fill here if relevant)

Steps to reproduce

  1. Initialize Clerk in an Android app
  2. Authenticate a user (valid session)
  3. Open Logcat
  4. Observe repeated ClerkLog entries every few seconds

Questions / Suggestions

  • Is there a way to completely disable Clerk logs in Android?
  • Is the debug flag currently working as intended?
  • Could log verbosity be reduced (e.g., only log errors/warnings in production)?
  • Is this polling behavior expected, or is it a bug?

Impact

  • Makes Logcat noisy and hard to use
  • Affects developer experience
  • May have performance implications depending on logging overhead

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions