backend-log

1.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i backend-log

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

1.96 kB

Total Files

3

Last publish

Collaborators

  • mwg-digital