/*! * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ export { createConsoleLog } from './console'; /** One of the supported log severities. */ export declare type LogSeverity = 'info' | 'warn' | 'error'; /** Provides basic logging functionality */ export interface Log { /** Logs a given `message` at info severity. */ info(message: string): void; /** Logs a given `message` at warn severity. */ warn(message: string): void; /** Logs a given `message` at error severity. */ error(message: string): void; /** * Starts a block log message with a given `severity`. * * Start a block to display a complex log message or wrap a set of messages. */ startBlock(severity: LogSeverity): LogBlock; } /** * Provides a way to log messages as a block. * * How a block functions is dependent on the implementation. A console log, for * example, could simply surround a block with dividing lines. */ export interface LogBlock { /** Logs a given `message` to the block. */ log(message: string): void; /** * Creates a space or divider in the block. * * Spaces may be contracted or combined by the implementation. */ space(): void; /** Ends the block. */ end(): void; /** Starts another block inside this block. */ startBlock(): LogBlock; }