@ma3-pro-plugins/ma3-pro-plugins-lib
Version:
TSTL Library for grandMA3 plugins
33 lines (32 loc) • 862 B
TypeScript
export declare enum LogLevel {
TRACE = 1,
DEBUG = 2,
INFO = 3,
WARN = 4,
ERROR = 5
}
export declare function toLogLevelString(logLevel: LogLevel): string;
type Params = {
prefix?: string[];
logLevel?: LogLevel;
withElappsedTimePrefix?: boolean;
};
/**
*
* @param configs a config heirarchy (anscestors) of this logger
*/
export declare function Logger(params?: Params): {
msg: (msg: string) => string;
printf: (msg: string) => void;
echo: (msg: string) => void;
trace: (msg: string) => void;
debug: (msg: string) => void;
info: (msg: string) => void;
warn: (msg: string) => void;
error: (msg: string) => void;
subLogger: (subPrefix: string) => any;
getLogLevel: () => LogLevel;
setLogLevel: (logLevel: LogLevel) => void;
};
export type Logger = ReturnType<typeof Logger>;
export {};