Skip to content

Probing failures spam console.log every 2s (breaks quiet-console consumers) #72

Description

@steve02081504

Problem

When probing fails with socket errors, @homebridge/ciao logs repeatedly via console.log:

[fount._http._tcp.local.] failed probing with reason: Error: Probing failed as of socket errors!. Trying again in 2 seconds!

Source: lib/Responder.js (around the failed probing with reason path). The same pattern exists for announcing (failed announcing with reason).

There is no documented way for consumers to:

  1. suppress or redirect these operational retry logs, or
  2. distinguish transient probe retries from fatal advertise failures without scraping console.log.

Why this matters

fount (https://github.com/steve02081504/fount) advertises an HTTP service with ciao on default fount server starts. Our live regression asserts that a fresh default start produces no console output for 10s. On Windows (and likely other hosts where multicast/UDP bind is flaky), ciao's retry console.log fails that invariant even though the HTTP server itself is healthy and we already handle advertise rejection via advertise().catch(...).

Expected

Prefer one of:

  • route operational retries through a pluggable logger / debug flag (default quiet or debug-level),
  • emit a typed event for probe/announce retries instead of (or in addition to) console.log,
  • rate-limit / log-once for repeated identical socket probe failures.

Environment

  • @homebridge/ciao 1.3.10 (also seen on 1.3.9)
  • Windows 10 / Deno consumers importing npm:@homebridge/ciao
  • Message text: Probing failed as of socket errors!

Ask

Is there an existing quiet/logger API we missed? If not, would you accept a PR to stop spamming console.log on transient probe retries?

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