This repository has been archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
sp core library.log.error
John Nguyen edited this page Apr 22, 2021
·
2 revisions
Home > @microsoft/sp-core-library > Log > error
Logs an error.
Signature:
static error(source: string, error: Error, scope?: ServiceScope): void;
Parameter | Type | Description |
---|---|---|
source | string | the source from where the error is logged, e.g., the class name. The source provides context information for the logged error. If the source's length is more than 20, only the first 20 characters are kept. |
error | Error | the error to be logged |
scope | ServiceScope | the service scope that the source uses. A service scope can provide more context information (e.g., web part information) to the logged error. |
Returns:
void