Skip to content

Standardize service log file locations #1155

@geoffjay

Description

@geoffjay

Summary

Service log file paths are currently defined only in launchd plist files with no convention that tooling can programmatically discover. Standardize log locations so diagnostic tools, the MCP server, and operators can reliably find them.

Problem

Log paths are currently:

  • Defined in contrib/plists/*.plist as StandardOutPath / StandardErrorPath
  • Pointing to /usr/local/var/log/agentd-<service>.{log,err}
  • Not discoverable by any service or tool without reading the plist XML

This means the MCP diagnostic tools, CLI, and any future monitoring have no way to find logs for a crashed service.

Proposed Solution

Standardize on a single convention and make it discoverable:

  1. Standard path: ~/Library/Application Support/agentd-<service>/service.{log,err} (or keep /usr/local/var/log/ but make it a constant)

  2. Make it discoverable via one or more of:

    • A shared constant in agentd-common that all services and tools import
    • A /log-path endpoint on each service's health router (only useful when the service is up)
    • A static config file listing all services and their log paths
  3. Update plists to use the standardized paths

Acceptance Criteria

  • All services use a consistent, documented log path convention
  • agentd-common exports a function to resolve the log path for a given service name
  • MCP diagnostic tools use this to locate logs for crashed services
  • Launchd plists are updated to match

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity:mediumMedium scope: <200 lines, 1-2 filesenhancementNew feature or requesttriagedIssue has been triaged, ready for planning or implementation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions