Socket
Socket
Sign inDemoInstall

kad-logger-json

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kad-logger-json

newline separated json logger as a readable stream for kad


Version published
Weekly downloads
12
Maintainers
1
Weekly downloads
 
Created
Source

Kad JSON Logger

Build Status NPM


Streaming logger for Kad as newline-separated JSON.

Quick Start

Install with NPM:

npm install kad-logger-json --save

Pass your logger to Kad:

// Import dependencies
var Node = require('kad').Node;
var JSONLogger = require('kad-logger-json');

// Create your logger
var logger = new JSONLogger();

// Plugin to your kad node
var node = new Node({
  /* ... */
  logger: logger
});

Pipe the log output to any writable stream:

// Make the logs your program's output
logger.pipe(process.stdout);
// Write the logs to a file
logger.pipe(fs.createWriteStream('logfile.txt'));

License

kad-logger-json - Streaming logger for Kad as newline-separated JSON. Copyright (C) 2016 Gordon Hall

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Keywords

FAQs

Package last updated on 27 Apr 2016

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