UNPKG

@dazejs/framework

Version:

Daze.js - A powerful web framework for Node.js

43 lines (42 loc) 2.01 kB
import winston from 'winston'; import { Application } from '../../foundation/application'; import { ClusterTransport } from './cluster'; export declare class Logger { protected app: Application; loggerName: string; static Cluster: typeof ClusterTransport; protected container: winston.Container; protected defaultChannels: any; protected defaultChannelName: string; protected defaultDrivers: Map<string, any>; protected customDrivers: Map<string, [any, any]>; protected defaultFormat: (format: any) => any; constructor(app: Application); log(level: string, message: string, ...meta: any[]): winston.Logger; error(message: string, ...meta: any[]): winston.Logger; warn(message: string, ...meta: any[]): winston.Logger; info(message: string, ...meta: any[]): winston.Logger; debug(message: string, ...meta: any[]): winston.Logger; addChannel(channelName: string, channelConfig: Record<string, any>): void; getLogger(): winston.Logger; getContainer(): winston.Container; protected resolveDefaultChannel(): winston.Logger; isDefaultDriverSupported(defaultDriverName: string): boolean; isCustomDriverSupported(customDriverName: string): boolean; channel(channelName?: string): winston.Logger; protected resolve(channelName: string): winston.Logger; getTransports(channelName: string): any[]; protected getFormat(channelName: string): any; protected getLevels(): any; private getLevel; protected getChannelConfigure<T extends { driver: string; [key: string]: any; }>(channelName: string): T; getDefaultChannelName(): any; protected isComposeChannel(channel: any): boolean; protected callCustomDriverCreator(config: Record<string, any>): any[]; addCustomDriver(channelName: string, Driver: any, defaultOptions?: Record<string, any>): this; protected composeDriverCreator(channel: any): any[]; protected defaultDriverCreator(options: Record<string, any>): any[]; }