UNPKG

794 BTypeScriptView Raw
1/**
2 * A list of logger's log level. These levels are sorted in
3 * order of increasing severity. Each log level includes itself and all
4 * the levels behind itself.
5 *
6 * @example new Logger({logLevel: 'warn'}) will print all the warn and error
7 * message.
8 */
9export declare type LogLevel = "all" | "log" | "info" | "warn" | "error" | "off";
10/**
11 * An object consumed by Logger constructor to initiate a logger object.
12 */
13export interface LoggerOptions {
14 logger?: Logger;
15 logLevel?: LogLevel;
16}
17/**
18 * Represents a logger object that is available in HandlerExecutionContext
19 * throughout the middleware stack.
20 */
21export interface Logger {
22 debug(...content: any[]): void;
23 info(...content: any[]): void;
24 warn(...content: any[]): void;
25 error(...content: any[]): void;
26}