import { Format , TransformableInfo } from 'logform' ; import * as winston from 'winston' ; import { ConsoleTransportInstance } from 'winston/lib/winston/transports' ; export function ConsoleLogger ( ) { const customFormat = winston . format . printf ( ( info ) => `${ info . level }: ${ info . message }` ) ; return new winston . transports . Console ( { level : 'error' , format : winston . format . combine ( winston . format ( ( info ) => { info . level = info . level . toUpperCase ( ) ; return info ; } ) ( ) , winston . format . colorize ( ) , winston . format . simple ( ) , customFormat ) , } ) ; }