Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
/ logger Public archive

Logging package for unified logging features

Notifications You must be signed in to change notification settings

voiceflow/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

circle ci Coverage Quality Gate Status

logger

A standardized package for logging built on pino.

Usage

import { createLogger, LogLevel, LogFormat } from '@voiceflow/logger';

const logger = createLogger({ format: LogFormat.JSON, level: LogLevel.INFO });

const inlineLogger = createLogger({ format: LogFormat.INLINE, level: LogLevel.WARN });

const detailedLogger = createLogger({ format: LogFormat.DETAILED, level: LogLevel.TRACE });

logger.trace('this is a trace log');
logger.debug('this is a debug log');
logger.info('this is an info log');
logger.warn('this is a warning log');
logger.error('this is an error log');
logger.fatal('this is a fatal log');