Skip to content

🟡 MEDIUM: Replace print statements with structured logging #216

@arkavo-com

Description

@arkavo-com

Problem

The codebase uses print() statements for logging instead of structured logging.

Examples Found

// AuthenticationManager.swift
print("Error getting public key data: \(error!.takeRetainedValue() as Error)")

// ArkavoMessageRouter.swift
print("Error: \(error)")

// Multiple files
print("Debug: ...")

Issues

  1. No log levels - Cannot filter by severity
  2. No context - Missing file, line, function info
  3. Production exposure - Sensitive data may be logged
  4. No aggregation - Cannot collect logs for debugging

Note

A SecureLogger.swift utility exists but is not consistently used.

Solution

  1. Audit all print() statements
  2. Replace with SecureLogger calls
  3. Add appropriate log levels (debug, info, warning, error)
  4. Ensure sensitive data is redacted in production

Acceptance Criteria

  • Zero print() statements in production code
  • All logs use SecureLogger
  • Log levels appropriate for each message
  • Sensitive data redacted

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions