Socket
Socket
Sign inDemoInstall

@vmgware/js-logger

Package Overview
Dependencies
2
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vmgware/js-logger

A versatile logging utility, offering color-coded console outputs and various log levels, adapted from the Uptime Kuma project for broad compatibility with JavaScript applications.


Version published
Weekly downloads
36
increased by5.88%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

@vmgware/js-logger

Quality Gate Status

Introduction

A versatile logging utility, offering color-coded console outputs and various log levels, adapted from the Uptime Kuma project for broad compatibility with JavaScript applications.

Features

  • Log Levels: Supports INFO, WARN, ERROR, and DEBUG levels.
  • Colorful Console Outputs: Enhances log readability with color-coded messages.
  • Timestamps: Each log entry is prefixed with a timestamp.
  • Environment Compatibility: Works seamlessly in Node.js and browser environments.
  • Customizable: Easy to integrate and customize within your JavaScript projects.

Installation

npm install @vmgware/js-logger

Usage

First, import the logger into your project:

import log from '@vmgware/js-logger';

Then, use it to log messages:

log.getInstance("DEBUG");
log.info('MyModule', 'This is an info message');
log.warn('MyModule', 'This is a warning message');
log.error('MyModule', 'This is an error message');
log.debug('MyModule', 'This is a debug message');

Configuration

The logger works out-of-the-box with default settings. However, you can customize the log levels and formats as needed in your project.

Acknowledgements

This package is extracted from Uptime Kuma, an open-source monitoring tool. Full credit goes to the original authors and contributors of Uptime Kuma.

License

This project is licensed under the MIT License.

Source

The original source of this logger can be found in the Uptime Kuma repository: Uptime Kuma log Source

FAQs

Last updated on 21 Jan 2024

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc