UNPKG

create-typescript-project-scaffolding

Version:
21 lines (18 loc) 546 B
import * as winston from 'winston'; /* * Log Level * error: 0, warn: 1, info: 2, http: 3, verbose: 4, debug: 5, silly: 6 */ const logger = winston.createLogger({ level: 'info', format: winston.format.combine( winston.format.colorize(), winston.format.timestamp({ format: 'DD.MM.YYYY - HH:mm:ss.SSS', }), winston.format.splat(), winston.format.printf(({ timestamp, level, message }) => `- [ ${timestamp} ] - [ ${level} ] ${message}`) ), transports: [new winston.transports.Console()], }); export { logger };