Skip to content

Conversation

pablorfb-meta
Copy link
Contributor

Differential Revision: D83786242

Summary:

Currently Monarch sits in the middle of log forwarding, ie if Monarch crashes a child proc's logs would be lost. 

 Here we add  `LogFileMonitor`, which will be the replacement for `LogFileWriter` and `LogTailer`.

`LogFileMonitor` enables "process spawners" to attach the monitor to specific files (e.g. a custom file where stdout/stderr are teed), which propagates updates to the provided `log_channel`. This will effectively move Monarch out of the critical path for logging, more context on [doc](https://docs.google.com/document/d/1TSrsFqlXRPEhKOyQhTKd1XyY9JrjLH6y_Z5iGnrnzBo/edit?tab=t.0#heading=h.vvg43v4o545o)

- Enables creation of temp log files
- Adds a file watcher that propagates updates on file modifications
- Add missing logging tests

Differential Revision: D84111031
Differential Revision: D83786242
Copy link

meta-codesync bot commented Oct 8, 2025

@pablorfb-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83786242.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant