Skip to content



The src/logger.ts file initialises the widely used Winston logger library, by default with the info log level, logging to the console.

import { createLogger, format, transports } from 'winston'

// Configure the Winston logger. For the complete documentation see
export const logger = createLogger({
  // To see more detailed errors, change this to 'debug'
  level: 'info',
  format: format.combine(format.splat(), format.simple()),
  transports: [new transports.Console()]

You can import the logger directly in any file where you want to add logging information.

import { logger } from './logger''Log some information here')

Released under the MIT License.