MemoryLogExporter implements LogExporter
FinalYes
Exporter that stores log entries in memory for direct access.
Useful for testing and inspection where you need direct access to exported data without serialization.
Interfaces
- LogExporter
- Interface for exporting log records to external systems.
Methods
- entries() : array<string|int, LogEntry>
- Get all exported log entries.
- export() : bool
- Export a batch of log entries.
- reset() : void
- Reset all stored data.
- transports() : array<string|int, Transport>
- Get the transports used by this exporter.
Methods
entries()
Get all exported log entries.
public
entries() : array<string|int, LogEntry>
Return values
array<string|int, LogEntry>export()
Export a batch of log entries.
public
export(array<string|int, LogEntry> $entries) : bool
Parameters
- $entries : array<string|int, LogEntry>
Return values
bool —True on success, false on failure
reset()
Reset all stored data.
public
reset() : void
transports()
Get the transports used by this exporter.
public
transports() : array<string|int, Transport>