UNPKG

@waiting/log

Version:

Lightweight logging for browser

20 lines (19 loc) 1.39 kB
import { Config, LogLevelType } from './model'; /** Whether the key of LocalStorage item is generated myself */ export declare function isLocalStorageKey(key: string, storagePrefix: Config['storagePrefix']): boolean; /** Whether supress the log level if lower then the runLevel */ export declare function isSuppressLogLevel(runLevel: LogLevelType, logLevel: LogLevelType): boolean; export declare function isLogLevelToPrune(logLevel: LogLevelType, pruneLevel?: LogLevelType): boolean; export declare function isTimeToPrune(time: string, pruneTime: Date): boolean; export declare function setMaxMsgLength(length: Config['maxMsgLength']): void; export declare function validateMaxMsgLength(length: any): void; export declare function setPersist(persist: Config['persist']): void; export declare function validatePersist(persist: any): void; export declare function setPersistTTL(ttl: Config['persistTTL']): void; export declare function validatePersistTTL(ttl: any): void; /** Set runLevel to supressing the logLevel listed in ENUM LogLevel which lower then the runLevel */ export declare function setRunLevel(runLevel: LogLevelType): void; export declare function validateLogLevel(logLevel: any): void; /** minus(-) be convert to underline _ */ export declare function setStoragePrefix(key: Config['storagePrefix']): void; export declare function validateStoragePrefix(key: any): void;