UNPKG

node-universe

Version:

基于 Nodejs 环境的一款微服务框架,原理来自于宇宙中的恒星,行星,卫星等系统。

20 lines (19 loc) 855 B
import kleur from 'kleur'; import BaseLogger from './base'; import { BaseLoggerLevels } from '../../typings/logger'; import { GenericObject } from '../../typings'; import { LoggerFactory } from './factory'; import { FormattedLoggerOptions } from '../../typings/logger/index'; export declare function getColor(type: BaseLoggerLevels): kleur.Color; export default class FormattedLogger extends BaseLogger { options: GenericObject | FormattedLoggerOptions; maxPrefixLength: number; objectPrinter: any; levelColorStr: object; constructor(options: GenericObject | FormattedLoggerOptions); init(loggerFactory: LoggerFactory): void; getNextColor(mod: string): string; padLeft(len: number): string; render(str: string, obj: any): string; getFormatter(bindings: GenericObject): (type: BaseLoggerLevels, args: any) => any; }