Owner of the BEAM-wide singleton *Messages* buffer.
One process, one buffer pid, regardless of how many editors are running.
This matches emacs --daemon semantics: a single message log that
outlives any individual frame (editor) and is available even in
headless mode where no editor exists.
Responsibilities
- Starts and supervises a single
Minga.Bufferprocess underMinga.Buffer.Supervisorwithbuffer_name: "*Messages*". - Subscribes to the
:log_messageEvents topic and appends every broadcast entry to that buffer with a timestamp prefix. - Drains any entries the
Minga.LoggerHandlerETS pre-subscribe buffer captured before this process was up. - Trims the buffer to
@max_lineslines so it stays bounded.
Boot order
Minga.LoggerHandler.install_messages_handler/0 runs at application
start, before this process is supervised. Logs emitted during early
boot land in the LoggerHandler ETS pre-subscribe buffer; this process
drains that buffer in init/1, so no entries are lost.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns the pid of the singleton *Messages* buffer, or nil if the
owner has never started successfully.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec pid() :: pid() | nil
Returns the pid of the singleton *Messages* buffer, or nil if the
owner has never started successfully.
Reads from :persistent_term so it never blocks on the owner's mailbox,
even during heavy log bursts.