Socket
Book a DemoInstallSign in
Socket

@vmgware/js-logger

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

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.

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
2
Created
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

Package last updated on 21 Jan 2024

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.