Skip to content

SDK prints API responses (PII) to STDOUT; make logging opt-in & logger-agnostic #14

Description

@rk-7

The Java SDK prints API responses using System.out.println(...). Those responses commonly contain PII (email addresses). In containerized/managed environments (Docker/ECS/K8s/Beanstalk), STDOUT is collected automatically and shipped to centralized logging (e.g., CloudWatch), which can unintentionally expose PII. In my opinion, the SDK should be silent by default and provide an opt-in, logger-agnostic mechanism for diagnostics.

Current behavior

Impact

  • Accidental PII leakage into centralized logs and SIEM tools.
  • No ability to control log levels or destinations from application code.
  • Difficult to comply with data-minimization and privacy requirements.

Proposed solution (minimal and non-breaking):

  1. Introduce a tiny internal logging facade (no external dependencies, logger-agnostic) with simple methods like debug, info, warn, error.
  2. Make the SDK silent by default - by introducing a simple NoOp logger.
  3. And if we want to log the payloads, we can have an explicit switch for payload logging. (would be off by default)

Happy to open a PR implementing the facade, replacements, tests, and small JavaDoc comments as needed.

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