New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nephelaiio/logger

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nephelaiio/logger

Custom log utilities

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
51
decreased by-83.28%
Maintainers
1
Weekly downloads
 
Created
Source

@nephelaiio/logger

Custom log utilities built on top of Winston for Node.js.

License: MIT

Table of Contents

Installation

Install the package using npm:

npm install @nephelaiio/logger

Usage

Initialization

First, initialize the logger by specifying the logging level and optionally some initial messages.

import { init } from "@nephelaiio/logger";

init(level, "info");

Logging

You can log messages at different levels using the utility methods.

import { debug, info, warn, error } from "@nephelaiio/logger";

debug("This is a debug message.");
info("This is an informational message.");
warn("This is a warning.");
error("This is an error.");

API

  • init(level: LogLevels, messages?: Messages, transports?: Transport[]): Initialize logger.
  • setInfo(msgs?: Messages): Set logging level to 'info'.
  • setVerbose(msgs?: Messages): Set logging level to 'debug'.
  • setWarn(msgs?: Messages): Set logging level to 'warn'.
  • setQuiet(msgs?: Messages): Set logging level to 'error'.
  • debug(message: string): Log a debug message.
  • info(message: string): Log an informational message.
  • warn(message: string): Log a warning message.
  • error(message: string): Log an error message.

Contributing

We welcome contributions! See CONTRIBUTING.md for details.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Issues

Please feel free to submit issues and enhancement requests here.

Keywords

FAQs

Package last updated on 02 Sep 2023

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc