CCExtractor / CCExtractor/ultimate_alarm_clock

Replace raw print/debugPrint usage with structured, redacted logging

Offen
#912 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Dart
Sterne
112
Forks
227
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Problem
The codebase contains many raw `print` / `debugPrint` calls in production paths. This can:
- create noisy logs that make real errors harder to triage
- leak internal state or sensitive runtime details in logs
- make logging behavior inconsistent across modules

## Example locations
- `lib/app/utils/system_ringtone_service.dart:75`
- `lib/app/data/providers/push_notifications.dart:8`
- `lib/app/modules/timer/views/timer_animation.dart:35`

## Why this is important
Logging should follow a structured policy with controllable verbosity and redaction. Ad-hoc prints increase operational risk and reduce observability quality.

## Proposed fix
- Introduce a centralized logging utility (e.g., wrapper with levels: debug/info/warn/error)
- Gate debug-level logs behind build mode / config
- Redact sensitive fields (tokens, user IDs, emails, device-specific identifiers)
- Replace raw `print`/`debugPrint` calls incrementally, starting with app logic and providers
- Add lint or CI check to prevent new raw print statements in production code

## Acceptance criteria
- Raw `print` calls removed from production paths (or explicitly justified)
- `debugPrint` usage follows centralized logger policy
- Sensitive values are redacted in logs
- Developer docs include logging guidelines

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.