BugReportLogBuffer
A bounded buffer of log entries a plugin writes for its bug reports. It keeps only what the plugin adds after creating it, at most BugReportLogBufferConstructorOptions.maxEntries entries, each cut to BugReportLogBufferConstructorOptions.maxEntryLength characters.
Import:
import { BugReportLogBuffer } from '@mnaoumov/obsidian-lib/bug-report-diagnostics';Signature:
export class BugReportLogBufferConstructor
new BugReportLogBuffer(options?: BugReportLogBufferConstructorOptions)Constructs a new instance.
Methods
| Method | Returns | Description |
|---|---|---|
| add(message) | void | Adds an entry, stamped with the current time. |
| clear() | void | Removes every entry. |
| getEntries() | readonly string[] | Gets the entries, oldest first. |
| toSection(options?) | BugReportDiagnosticSection | Builds a potentially private diagnostic section holding the entries. |
Links to this page: