UNPKG

textiot

Version:

A framework for building web and native (IoT) Dapps on the IPFS network

28 lines (27 loc) 1.12 kB
import { API } from '../core/api'; /** * Logs is an API module for managing the verbosity of one or all subsystems logs * * Textile logs piggyback on the IPFS event logs * * @extends API */ export default class Logs extends API { /** * List the verbosity of one or all subsystems logs * * @param subsystem Subsystem logging identifier (omit for all) * @param tex Whether to list only Textile subsystems, or all available subsystems * @returns An object of (current) key- (subsystem) value (level) pairs */ get(subsystem?: string, tex?: boolean): Promise<Record<string, string>>; /** * Set the verbosity of one or all subsystems logs * * @param level Log level, must be one of: debug, info, warning, error, or critical. * @param subsystem Subsystem logging identifier (omit for all) * @param tex Whether to change only Textile subsystems, or all available subsystems * @returns An object of (updated) key- (subsystem) value (level) pairs */ set(level: string, subsystem?: string, tex?: boolean): Promise<Record<string, string>>; }