New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

centralized-logger

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

centralized-logger

Centralized logger for API development with NodeJs and ExpressJs based on bunyan & bunyan-express-serializer

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

Centralized logger v1.0.5

Centralized logger for API development with NodeJs and ExpressJs, based on bunyan & bunyan-express-serializer

Installation

Using npm

In your project folder

$ npm i centralized-logger

Important

Define the environment variables to set the API name and the log level.

example:

Linux =) or MacOS ¬¬

$ export LOG_LEVEL=info

Windows =(

$ set LOG_LEVEL=info

By default they are set as NAME_API=centralized-logger, LOG_LEVEL=info

In nodeJs

In your server file ex. app.js, index.js, server.js, etc...

const log = require("centralized-logger").loggerInstance;
log.info("hi info");
log.error("hi error");

To capture, manage and log all request

const app = express();
require("centralized-logger/instanceLog").capture(app);

Keywords

bunyan

FAQs

Package last updated on 21 Apr 2021

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