🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

stump.js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stump.js

Innovative logging for Node.js

1.1.0
latest
Source
npm
Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

Stump.js

Stump.js gives you more control of the data logged to the console. You can easily toggle debug messages and verbose messages on and off, as well as locate error messages faster.

Code example

Code: Code example Output: Output example

Logging to a Discord webhook

Setting up a Discord channel with a webhook is a great way to save logs in a searchable format for free.

Code: Code example Output: Output example

Usage

The Stump class is invoked with two arguments: features and settings. The Debug feature enables the debug and verbose log messages. The Discord feature enables posting to a Discord webhook and requires the webhook parameter in the settings object.

To enable timestamps, add the Timestamp feature.

Output: Output example

Logging methods:

  • .info()
  • .success()
  • .warn()
  • .error()
  • .verbose()
  • .debug()

Keywords

logging

FAQs

Package last updated on 14 Oct 2021

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