1.0.3 • Published 2 years ago

backend-log v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago