Skip to content

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 BugReportLogBuffer

Constructor

new BugReportLogBuffer(options?: BugReportLogBufferConstructorOptions)

Constructs a new instance.

Methods

MethodReturnsDescription
add(message)voidAdds an entry, stamped with the current time.
clear()voidRemoves every entry.
getEntries()readonly string[]Gets the entries, oldest first.
toSection(options?)BugReportDiagnosticSectionBuilds a potentially private diagnostic section holding the entries.

Links to this page: