custom-console-package

1.0.0 • Public • Published

Custom Console Package

The CustomConsole npm package provides a flexible logging utility tailored for JavaScript applications. While mirroring the behavior of a standard console during development, it intelligently routes error messages to a designated endpoint in production environments, facilitating streamlined error tracking and management.

Features

  • Seamless transition between development and production logging.
  • Direct error logging to a specified server endpoint in production.
  • Simplified setup and integration.

Installation

You can install the package via npm:

npm install custom-console-package

Usage

Initialize the CustomConsole class with your desired error logging endpoint:

const CustomConsole = require("custom-console-package");

const customConsole = new CustomConsole("https://my-server.com/error-endpoint");

customConsole.log("This is a log message.");
customConsole.error("This is an error message.");

Parameters

  • errorEndpoint: The URL endpoint where error messages will be sent during production.

Contributing

We welcome contributions! Please read the CONTRIBUTING.md file for guidelines.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Ensure you save this content in a file named README.md in your repository root or where appropriate.

Package Sidebar

Install

npm i custom-console-package

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

4.71 kB

Total Files

5

Last publish

Collaborators

  • onyedika-anagha