lakutata
Version:
An IoC-based universal application framework.
143 lines (140 loc) • 3.86 kB
TypeScript
import '../vendor/TypeDef.2.js';
import { C as Component } from '../vendor/TypeDef.3.js';
import '../vendor/TypeDef.5.js';
/**
* Logger component
*/
declare class Logger extends Component {
#private;
/**
* Format pretty log message
* @protected
*/
protected readonly pretty: boolean;
/**
* Log level
* @protected
*/
protected readonly level: string;
/**
* If set to true, will add color information to the formatted output message.
* @protected
*/
protected readonly colorize: boolean;
/**
* Makes messaging synchronous.
* @protected
*/
protected readonly sync: boolean;
/**
* Stream to write to
* @protected
*/
protected readonly destinations: NodeJS.WritableStream[];
/**
* Initializer
* @protected
*/
protected init(): Promise<void>;
/**
* Write a 'error' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
error<T extends object>(obj: T, msg?: string, ...args: any[]): void;
/**
* Write a 'error' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
error(obj: unknown, msg?: string, ...args: any[]): void;
/**
* Write a 'error' level log, if the configured level allows for it.
* @param msg
* @param args
*/
error(msg: string, ...args: any[]): void;
/**
* Write a 'warn' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
warn<T extends object>(obj: T, msg?: string, ...args: any[]): void;
/**
* Write a 'warn' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
warn(obj: unknown, msg?: string, ...args: any[]): void;
/**
* Write a 'warn' level log, if the configured level allows for it.
* @param msg
* @param args
*/
warn(msg: string, ...args: any[]): void;
/**
* Write a 'info' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
info<T extends object>(obj: T, msg?: string, ...args: any[]): void;
/**
* Write a 'info' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
info(obj: unknown, msg?: string, ...args: any[]): void;
/**
* Write a 'info' level log, if the configured level allows for it.
* @param msg
* @param args
*/
info(msg: string, ...args: any[]): void;
/**
* Write a 'debug' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
debug<T extends object>(obj: T, msg?: string, ...args: any[]): void;
/**
* Write a 'debug' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
debug(obj: unknown, msg?: string, ...args: any[]): void;
/**
* Write a 'debug' level log, if the configured level allows for it.
* @param msg
* @param args
*/
debug(msg: string, ...args: any[]): void;
/**
* Write a 'trace' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
trace<T extends object>(obj: T, msg?: string, ...args: any[]): void;
/**
* Write a 'trace' level log, if the configured level allows for it.
* @param obj
* @param msg
* @param args
*/
trace(obj: unknown, msg?: string, ...args: any[]): void;
/**
* Write a 'trace' level log, if the configured level allows for it.
* @param msg
* @param args
*/
trace(msg: string, ...args: any[]): void;
}
export { Logger };