Skip to content

Conversation

andrewm4894
Copy link
Contributor

@andrewm4894 andrewm4894 commented Oct 14, 2025

Problem

Developers working with AI coding assistants need access to service logs for debugging, but the standard mprocs TUI doesn't persist logs to files that AI tools can read.

I found this sort of broke my flywheel with claude or other code assistant tools. Ideally i want those tools to be able to "see" everything i see in the mprocs TUI.

Changes

Added bin/mprocs-with-logging.yaml - an alternative mprocs configuration that:

  • Logs all service output to /tmp/posthog-*.log files using tee
  • Maintains the standard mprocs TUI experience
  • Enables AI coding assistants to read logs while developers use the terminal UI

Usage:

bin/start --custom bin/mprocs-with-logging.yaml

If merged then i will also make a PR to update the handbook to mention this new optional way to run with /tmp/ logging too.

How did you test this code?

Tested locally by:

  1. Running bin/start --custom bin/mprocs-with-logging.yaml
  2. Verified all services started correctly
  3. Confirmed log files were created in /tmp/ directory
  4. Verified AI coding assistant could read and analyze the log files
  5. Confirmed mprocs TUI still functions normally

Changelog: (features only) Is this feature complete?

No - this is a developer tooling improvement, not a user-facing feature.

Examples

For example i can have claude now actually "see" the mprocs logs for each process such that it can just tail and grep the corresponding log files in my /tmp/ dir:

image image

andrewm4894 and others added 2 commits October 14, 2025 07:53
Add mprocs-with-logging.yaml configuration that logs all service output
to /tmp/ directory while maintaining the standard mprocs TUI experience.

This enables developers to:
- Use mprocs terminal UI for monitoring services interactively
- Allow AI coding assistants to read service logs from /tmp/ files
- Debug issues by reviewing persistent log files

Usage:
  bin/start --custom bin/mprocs-with-logging.yaml

Log files are written to /tmp/posthog-*.log for each service.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@andrewm4894 andrewm4894 marked this pull request as ready for review October 14, 2025 12:03
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

Update log file naming to match mprocs process names exactly for
better clarity when debugging with AI coding assistants.

Examples:
- temporal-worker-general-purpose -> posthog-temporal-worker-general-purpose.log
- cyclotron-janitor -> posthog-cyclotron-janitor.log
- embedding-worker -> posthog-embedding-worker.log

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@andrewm4894
Copy link
Contributor Author

Closing in favor of #39771 which is on a PostHog branch instead of a fork branch, making it easier for teammates to check out and test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant