ErrorLog extends BeagleLog to provide specialized handling for JavaScript errors and exceptions. It automatically sets the log level to 'error' and extracts error messages.
Properties
Inherits all properties fromBeagleLog, plus:
unknown
required
The original error object or value that was logged. Can be an
Error instance, string, or any other value.Constructor
unknown
required
The error to log. Can be an
Error object, string, or any other value.- If
erroris anErrorinstance, useserror.messageas the log message - Otherwise, converts the error to a string using
String(error) - Automatically sets
levelto'error' - Stores the original error in the
errorproperty