🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

simple-winston-logger-abstraction

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-winston-logger-abstraction

logger abstraction for winston

latest
npmnpm
Version
2.2.1
Version published
Maintainers
1
Created
Source

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.

Keywords

winston

FAQs

Package last updated on 05 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts