Skip to main content

Logger

Introduction

CairJS implement Pino, Logger.

Install package

npm install @cairjs/logger

Example

import logger from '@cairjs/logger'

logger.debug('debug')
logger.info('info')
logger.warn('warn')
logger.error('error')

Example using Winston

Use setStrategy method.

import { logger, Strategies } from '@cairjs/logger'

logger.setStrategy(new Strategies.Winston())
logger.debug('debug')
logger.info('info')
logger.warn('warn')
logger.error('error')