Socket
Book a DemoInstallSign in
Socket

backend-log

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

backend-log

Logs for console in backend systems, using CGMP pattern

1.0.3
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Backend-Log

A simple logging utility for Node.js applications.

Installation

npm install backend-log

Usage

Import the Console class from the package and use its static methods for logging:

const { Console } = require("backend-log");

// Log an info message
Console.info("Info message");

// Log a payload message
Console.payload("Payload message");

// Log an error message
Console.error("Error message");

Configuration

Set the LOG_LEVEL environment variable to control the log output:

  • OFF: Disable logging.
  • ERROR: Log error messages only.
  • WARNING: Log error and payload messages.
  • Any other value: Log all messages.
export LOG_LEVEL=ERROR

FAQs

Package last updated on 11 Oct 2023

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.