Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp core library.log

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-core-library > Log

Log class

A basic redirectable logging system.

Signature:

export default class Log

Remarks

The Log class provides static methods for logging messages at different levels (verbose, info, warning, error) and with context information. Context information helps identify which component generated the messages and allows for filtering of log events. In a SharePoint Framework application, these messages will appear on the developer dashboard.

Methods

Method Modifiers Description
error(source, error, scope) static Logs an error.
info(source, message, scope) static Logs a general informational message.
verbose(source, message, scope) static Logs a message which contains detailed information that is generally only needed for troubleshooting.
warn(source, message, scope) static Logs a warning.
Clone this wiki locally