Beagle class provides static methods for registering plugins and logging events throughout your application.
Methods
registerPlugin()
Registers a custom plugin to handle and display specific log types.A plugin instance that extends
BeagleLogPlugin. The plugin determines how specific log types are handled and displayed in the inspector.log()
Logs an event that will be captured and displayed in the Beagle inspector.A log instance that extends the
BeagleLog abstract class. The log contains metadata like id, time, message, and level.Related Types
BeagleLog
Abstract base class for all logs:id: string- Unique identifier for the logtime: Date- Timestamp when the log was createdmessage: string- Log messagelevel: LogLevel- Log level (‘loading’ | ‘info’ | ‘warning’ | ‘error’ | ‘success’)
BeagleLogPlugin
Abstract base class for plugins:name: string- Plugin namecanHandle(log: BeagleLog): boolean- Determines if this plugin handles the log typeprovideDetailContent(log: T): DetailContent- Provides content for the detail viewprovideCardFooter(log: T): Content | null- Optional card footer contentexportToJSON(log: T): string- Export log to JSON format