Socket
Socket
Sign inDemoInstall

block-logger

Package Overview
Dependencies
18
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    block-logger

Log everything


Version published
Weekly downloads
6
increased by20%
Maintainers
3
Install size
513 kB
Created
Weekly downloads
 

Readme

Source

block-logger

Usage example

npm install --save block-logger

test.js

'use strict';

const process = require('process');
const os = require('os');

const Logger = require('block-logger');

const options = {
    host: process.env.LOGSTASH_HOST || '127.0.0.1',
    port: process.env.LOGSTASH_PORT || 5050,
    domain: 'com.aigent.pipeline.block.' + os.hostname(),
    level: 'debug'
};

const logger = Logger.logstash(options);

let counter = 1;
setInterval(() => {
    console.log(`sending test counter ${counter}`);
    logger.debug('test', {counter: counter++});
}, 1000);

Dev:

Transpile TypeScript into Javascript:

npm install
npm run-script build
npm publish

FAQs

Last updated on 16 Jan 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc