Skip to main content

Module log_buffer

Module log_buffer 

Source
Expand description

IDE-internal logging system.

ooLogger hooks into the log crate and fans each record out to:

  1. A fixed-capacity in-memory ring buffer (LogBuffer).
  2. A tokio::sync::broadcast channel so the log view receives live entries.

The file sink is handled by simplelog::WriteLogger via simplelog::CombinedLogger; this module only manages the in-process buffer.

Structs§

InMemoryLogger
LogBuffer
Fixed-capacity FIFO that keeps the most recent N entries.
LogEntry
One captured log record.
LogState
Shared state between the custom logger and any subscribers (e.g. LogView).

Functions§

init_combined_logger
Initialise a combined logger: simplelog::WriteLogger to log_file plus the in-memory logger. Returns the LogState handle to thread into the app.