import type { default as ServiceScope } from '../serviceScope/ServiceScope'; import type ILogHandler from './ILogHandler'; /** * A basic redirectable logging system. * * @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. * * @public */ export default class Log { private static _logHandler; /** * Configures the logger with a different target. * * @internal */ static _initialize(logHandler: ILogHandler): void; /** * Logs a message which contains detailed information that is generally only needed for * troubleshooting. * @param source - the source from where the message is logged, e.g., the class name. * The source provides context information for the logged message. * If the source's length is more than 20, only the first 20 characters are kept. * @param message - the message to be logged * If the message's length is more than 100, only the first 100 characters are kept. * @param scope - the service scope that the source uses. A service scope can provide * more context information (e.g., web part information) to the logged message. */ static verbose(source: string, message: string, scope?: ServiceScope): void; /** * Logs a general informational message. * @param source - the source from where the message is logged, e.g., the class name. * The source provides context information for the logged message. * If the source's length is more than 20, only the first 20 characters are kept. * @param message - the message to be logged * If the message's length is more than 100, only the first 100 characters are kept. * @param scope - the service scope that the source uses. A service scope can provide * more context information (e.g., web part information) to the logged message. */ static info(source: string, message: string, scope?: ServiceScope): void; /** * Logs a warning. * @param source - the source from where the message is logged, e.g., the class name. * The source provides context information for the logged message. * If the source's length is more than 20, only the first 20 characters are kept. * @param message - the message to be logged * If the message's length is more than 100, only the first 100 characters are kept. * @param scope - the service scope that the source uses. A service scope can provide * more context information (e.g., web part information) to the logged message. */ static warn(source: string, message: string, scope?: ServiceScope): void; /** * Logs an error. * @param source - 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. * @param error - the error to be logged * @param scope - the service scope that the source uses. A service scope can provide * more context information (e.g., web part information) to the logged error. */ static error(source: string, error: Error, scope?: ServiceScope): void; } //# sourceMappingURL=Log.d.ts.map