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

logd

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logd

A powerful modular logging facility for node.js

5.1.11
latest
Source
npm
Version published
Weekly downloads
555
-8.26%
Maintainers
1
Weekly downloads
 
Created
Source

logd

A powerful modular logging facility for node.js

npm

Using Logd

In the main file of your application or library, import the module, define a namespace and set a transport for the log output.

import logd from 'logd';

// define the module we're logging from
const log = logd.module('my-service');


// start logging
log.info('some information');


// you may pass as many arguments as you like 
// to the log methods
log.error('something went wrong', err, {some: 'data'});

Enable logs: Node

node mysript.js --l
node mysript.js --l --warn
node mysript.js --log
node mysript.js --log --level=debug

Enable logs: Browser

in the console

logd.enable();
logd.enable('error');

Keywords

log

FAQs

Package last updated on 26 Jun 2025

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