Skip to content

Conversation

andrewm4894
Copy link
Contributor

@andrewm4894 andrewm4894 commented Oct 16, 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

This PR supersedes #39623 (from fork) to make it easier for team mates to check out the feature branch.

andrewm4894 and others added 5 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]>
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

@Radu-Raicea this is ready for playing around with

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

Copy link
Contributor

Size Change: 0 B

Total Size: 3.05 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 3.05 MB

compressed-size-action

Copy link
Member

@Radu-Raicea Radu-Raicea left a comment

Choose a reason for hiding this comment

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

Great stuff! Maybe we should modify a README or other documentation with this new feature.

@andrewm4894 andrewm4894 merged commit 98b78df into master Oct 16, 2025
218 of 221 checks passed
@andrewm4894 andrewm4894 deleted the feat/add-mprocs-with-logging branch October 16, 2025 12:14
@andrewm4894
Copy link
Contributor Author

Great stuff! Maybe we should modify a README or other documentation with this new feature.

yep planning a follow on in the handbook for the dev section to just mention it somewhere and maybe a pr to add a note to CLAUDE.md potentially - gonna look into that or if would be noise

@webjunkie
Copy link
Contributor

👏🏻

Please also keep @PostHog/devex in the loop about this kind of work. Thanks!

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.

3 participants