BeagleLog is the abstract base class that all log types extend. It provides core functionality for log entries including identification, timestamps, messages, and filtering.
Properties
Unique identifier for the log entry. Auto-generated using nanoid(6) if not provided.
Timestamp when the log was created. Automatically set to
new Date() during construction.The log message content.
The severity level of the log. Can be one of:
'loading', 'info', 'warning', 'error', or 'success'.Constructor
The log message content.
Optional severity level. One of:
'loading' | 'info' | 'warning' | 'error' | 'success'.Optional custom ID. If not provided, a unique 6-character ID is generated automatically.
Methods
filter()
Filters the log based on a search query.The search query to filter by.
boolean - true if the log’s message contains the query (case-insensitive), false otherwise.