2.2.1 • Published 2 years ago

simple-winston-logger-abstraction v2.2.1

Weekly downloads
32
License
WTFPL
Repository
-
Last release
2 years ago

simple-winston-logger-abstraction

DESCRIPTION:

Wraps around winston logger instantion and exposes info, error, debug methods

USAGE:

// typescript
import logger from 'simple-winston-logger-abstraction'
// js
const logger = require('simple-winston-logger-abstraction');

// Info method
logger.info(`calling method with this payload ${JSON.stringify(payload)}`, "request_id")

// Error method
logger.error(`error: ${err.message}`)
logger.debug(`error: ${err.message} ${err.stack}`)

// Debug method
logger.debug(`calling method with this payload ${JSON.stringify(payload)} and this ID ${id}`)

Set an environment variable LOG_LEVEL:"debug||info||error" for required logging level.

2.2.1

2 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.2

5 years ago

1.0.0

5 years ago