Replace `print` with `os.Logger` so failures are findable

Aperta
#42 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@amritkang165 ci sta già lavorando.

Dal 10/11/2026.

  • #50 di @amritkang165 — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement good first issue

Labels: enhancement, good first issue · Difficulty: easy (about 1 to 2 hours)

Problem
CatNotch is a GUI app, so print output goes nowhere a user or a bug reporter can see it. Five real failure paths log with print:

  • CatNotchCore/CatNotchStore.swift:178 ([store] write failed)
  • CatNotchCore/ClaudeHooks.swift:421 ([claude] no free port)
  • CatNotchCore/ClaudeHooks.swift:422 (hook sync failed)
  • CatNotch/GlobalShortcut.swift:30 (shortcut already taken)
  • CatNotch/SettingsWindow.swift:447 (open at login failed)

A failed store write or a missing hook port is exactly what a bug report needs, and today it vanishes.

Expected outcome
These messages go to the unified log through os.Logger, visible in Console.app and log stream, with no behavior change.

Relevant files

  • The five locations above (re-run grep -rnE '\bprint\(' CatNotch CatNotchCore to confirm the list).

Acceptance criteria

  • No print( remains in CatNotch/ or CatNotchCore/.
  • One Logger per file or subsystem, using the bundle ID com.thecharydev.catnotch as the subsystem. Do not log tokens, file contents or full paths of the user's files.
  • No change to what the app does. The existing tests still pass.
  • The PR description shows the Console.app filter to find the messages.
Lingua principale
Swift
Stelle
1
Fork
1
Merge medio
14m
PR unite (30g)
15

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di thecharydev/catnotch

Tutte le issue di thecharydev/catnotch

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.