Skip to content

hostd: JSON file logging for match history #108

@dougborg

Description

@dougborg

Summary

Add optional file-based logging of detection matches in hostd, writing NDJSON to a rotated log file for offline analysis.

Context

stdout works for real-time piping, but users also need persistent match history when running hostd as a background service.

Implementation

  • Add --log-dir <path> CLI flag
  • Write match messages to date-stamped NDJSON files (e.g., airhound-2026-03-15.ndjson)
  • Rotate daily, optional size limit
  • Same DeviceMessage format as stdout — files are directly consumable by companion tools
  • Optional: --log-all to log all scanned devices (not just matches)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthostdHost daemon (Mac/Linux)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions